From 1f9a5d6f7e519286fcaf0e033915ff943b786a9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20B=C3=A9rard?= Date: Sat, 9 Sep 2006 19:20:17 +0000 Subject: [PATCH] * Fix EC0 ACPI device path for Satellite M100 * Assign ectype 12 to Satellite M100 as it should work now --- acpi.c | 25 +++++++++++++++---------- laptop.h | 4 ++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/acpi.c b/acpi.c index 9878536..c1b3ce3 100644 --- a/acpi.c +++ b/acpi.c @@ -28,8 +28,6 @@ * ACPI backend masks and strings */ -#define EC_ACPI_DEVICE "\\_SB.PCI0.LPCB.EC0" - #define GET_WIRELESS_METHOD "ANTR" #define SET_WIRELESS_METHOD "ANTW" #define WLEX_MASK 0x4 @@ -48,6 +46,12 @@ #define CRT_CSTE 0x2 #define TVO_CSTE 0x4 + +static char ec_dev_list[][20] = { + "\\_SB.PCI0.LPCB.EC0", + "\\_SB.PCI0.LPC0.EC0", +}; + /* * Probe for expected ACPI device * FIXME we check only the ACPI device and not the associated methods @@ -55,22 +59,23 @@ static int omnibook_acpi_probe(const struct omnibook_operation *io_op) { acpi_handle dev_handle; - int retval = 0; + int i; if(acpi_disabled) { printk(O_ERR "ACPI is disabled: feature unavailable.\n"); return -ENODEV; } - if(acpi_get_handle(NULL, EC_ACPI_DEVICE, &dev_handle) != AE_OK) { - printk(O_ERR "Can't get handle on ACPI EC device"); - return -ENODEV; + for(i = 0; i < ARRAY_SIZE(ec_dev_list); i++) { + if(acpi_get_handle(NULL, ec_dev_list[i], &dev_handle) == AE_OK) { + acpi_backend.data = dev_handle; + dprintk("ACPI probing was successfull\n"); + return 0; + } } - acpi_backend.data = dev_handle; - - dprintk("ACPI probing was successfull\n"); - return retval; + printk(O_ERR "Can't get handle on ACPI EC device.\n"); + return -ENODEV; } /* diff --git a/laptop.h b/laptop.h index be515dd..8cb77f3 100644 --- a/laptop.h +++ b/laptop.h @@ -594,7 +594,7 @@ static struct dmi_system_id omnibook_ids[] __initdata = { DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE M100"), }, - .driver_data = (void*) TSM30X /*FIXME*/ + .driver_data = (void*) TSM30X }, { .callback = dmi_matched, @@ -603,7 +603,7 @@ static struct dmi_system_id omnibook_ids[] __initdata = { DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), DMI_MATCH(DMI_PRODUCT_NAME, "Satellite M100"), }, - .driver_data = (void*) TSP10 /*FIXME*/ + .driver_data = (void*) TSM30X }, { .callback = dmi_matched, -- 2.43.5