diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-03-28 19:12:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-03-28 19:12:18 +0000 |
commit | e07ad81a7d23927e80a8c1d89a4544f3c141be8d (patch) | |
tree | 723bc8e311662a517d5e489102d6f1a6b6bca8aa /sys/dev | |
parent | 965f0a784b5d8ba4b1bcd2b792043e1c0962fb25 (diff) |
Adding each and every new acpi device driver to acpi_foundhid() is
gettinga bit of the burden. And it really isn't how our autoconf
framework is supposed to work for busses that can be enumerated. All
the drivers already check for a matching _HID in their attach
function. So we can just drop the checks in acpi_foundhid() and let
the drivers sort themselves out.
Print a "not configured" line for devices for which we don't attach adriver.
This may be a bit much as there are devices for which we will not have a
driver. This will be removed if it causes too much dmesg spam.
ok deraadt@, mlarkin@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 6ae2f2d549f..881bf3636ef 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.305 2016/01/17 09:04:18 jsg Exp $ */ +/* $OpenBSD: acpi.c,v 1.306 2016/03/28 19:12:17 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -1155,6 +1155,8 @@ acpi_print(void *aux, const char *pnp) if (pnp) { if (aa->aaa_name) printf("%s at %s", aa->aaa_name, pnp); + else if (aa->aaa_dev) + printf("\"%s\" at %s", aa->aaa_dev, pnp); else return (QUIET); } @@ -2778,37 +2780,16 @@ acpi_foundhid(struct aml_node *node, void *arg) aaa.aaa_node = node->parent; aaa.aaa_dev = dev; - if (!strcmp(dev, ACPI_DEV_AC)) { - aaa.aaa_name = "acpiac"; - } else if (!strcmp(dev, ACPI_DEV_CMB)) { - aaa.aaa_name = "acpibat"; - } else if (!strcmp(dev, ACPI_DEV_LD) || - !strcmp(dev, ACPI_DEV_PBD) || - !strcmp(dev, ACPI_DEV_SBD)) { - aaa.aaa_name = "acpibtn"; - } else if (!strcmp(dev, ACPI_DEV_ASUS) || + if (!strcmp(dev, ACPI_DEV_ASUS) || !strcmp(dev, ACPI_DEV_ASUS1)) { - aaa.aaa_name = "acpiasus"; acpi_asus_enabled = 1; } else if (!strcmp(dev, ACPI_DEV_IBM) || !strcmp(dev, ACPI_DEV_LENOVO)) { - aaa.aaa_name = "acpithinkpad"; acpi_thinkpad_enabled = 1; - } else if (!strcmp(dev, ACPI_DEV_ASUSAIBOOSTER)) { - aaa.aaa_name = "aibs"; } else if (!strcmp(dev, ACPI_DEV_TOSHIBA_LIBRETTO) || !strcmp(dev, ACPI_DEV_TOSHIBA_DYNABOOK) || !strcmp(dev, ACPI_DEV_TOSHIBA_SPA40)) { - aaa.aaa_name = "acpitoshiba"; acpi_toshiba_enabled = 1; - } else if (!strcmp(dev, "80860F14") || !strcmp(dev, "PNP0FFF")) { - aaa.aaa_name = "sdhc"; - } else if (!strcmp(dev, ACPI_DEV_DWIIC1) || - !strcmp(dev, ACPI_DEV_DWIIC2) || - !strcmp(dev, ACPI_DEV_DWIIC3) || - !strcmp(dev, ACPI_DEV_DWIIC4) || - !strcmp(dev, ACPI_DEV_DWIIC5)) { - aaa.aaa_name = "dwiic"; } #ifndef SMALL_KERNEL @@ -2822,8 +2803,7 @@ acpi_foundhid(struct aml_node *node, void *arg) } #endif - if (aaa.aaa_name) - config_found(self, &aaa, acpi_print); + config_found(self, &aaa, acpi_print); return (0); } |