]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
* Fix EC0 ACPI device path for Satellite M100
authorMathieu Bérard <mathieu.berard@crans.org>
Sat, 9 Sep 2006 19:20:17 +0000 (19:20 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Sat, 9 Sep 2006 19:20:17 +0000 (19:20 +0000)
* Assign ectype 12 to Satellite M100 as it should work now

acpi.c
laptop.h

diff --git a/acpi.c b/acpi.c
index 98785365b1368a9edb3b9497f780fb31f8ae87ea..c1b3ce3abef9f2db38a7d43705db7b936067cb66 100644 (file)
--- 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
 #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
 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;
 }
 
 /*
index be515dda179a3c0a13457b5599d116f93c27c423..8cb77f3ce3efe723733b80c291a63f2d7d8fa6c5 100644 (file)
--- 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,