Simply don'tmatch if the ws_get_param or ws_set_param callback has
been set. That way we don't need the platform-specific acpi driver
"enabled" variables anymore.
ok?
Index: acpi.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpi.c,v
retrieving revision 1.306
diff -u -p -r1.306 acpi.c
--- acpi.c 28 Mar 2016 19:12:17 -0000 1.306
+++ acpi.c 28 Mar 2016 21:08:22 -0000
@@ -121,10 +121,6 @@ int acpi_add_device(struct aml_node *nod
void acpi_thread(void *);
void acpi_create_thread(void *);
-int acpi_thinkpad_enabled;
-int acpi_toshiba_enabled;
-int acpi_asus_enabled;
-
#ifndef SMALL_KERNEL
void acpi_indicator(struct acpi_softc *, int);
@@ -1097,10 +1093,8 @@ acpi_attach(struct device *parent, struc
/* attach docks */
aml_find_node(&aml_root, "_DCK", acpi_founddock, sc);
- /* attach video only if this is not a thinkpad or toshiba */
- if (!acpi_thinkpad_enabled && !acpi_toshiba_enabled &&
- !acpi_asus_enabled)
- aml_find_node(&aml_root, "_DOS", acpi_foundvideo, sc);
+ /* attach video */
+ aml_find_node(&aml_root, "_DOS", acpi_foundvideo, sc);
/* create list of devices we want to query when APM comes in */
SLIST_INIT(&sc->sc_ac);
@@ -2779,18 +2773,6 @@ acpi_foundhid(struct aml_node *node, voi
aaa.aaa_memt = sc->sc_memt;
aaa.aaa_node = node->parent;
aaa.aaa_dev = dev;
-
- if (!strcmp(dev, ACPI_DEV_ASUS) ||
- !strcmp(dev, ACPI_DEV_ASUS1)) {
- acpi_asus_enabled = 1;
- } else if (!strcmp(dev, ACPI_DEV_IBM) ||
- !strcmp(dev, ACPI_DEV_LENOVO)) {
- acpi_thinkpad_enabled = 1;
- } else if (!strcmp(dev, ACPI_DEV_TOSHIBA_LIBRETTO) ||
- !strcmp(dev, ACPI_DEV_TOSHIBA_DYNABOOK) ||
- !strcmp(dev, ACPI_DEV_TOSHIBA_SPA40)) {
- acpi_toshiba_enabled = 1;
- }
#ifndef SMALL_KERNEL
if (!strcmp(cdev, ACPI_DEV_MOUSE)) {
Index: acpivout.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/acpivout.c,v
retrieving revision 1.11
diff -u -p -r1.11 acpivout.c
--- acpivout.c 14 Mar 2015 03:38:47 -0000 1.11
+++ acpivout.c 28 Mar 2016 21:08:22 -0000
@@ -94,6 +94,9 @@ acpivout_match(struct device *parent, vo
aaa->aaa_table != NULL)
return (0);
+ if (ws_get_param || ws_set_param)
+ return (0);
+
return (1);
}