]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/scan.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / drivers / acpi / scan.c
index 1f98103b53c394b4aa17d4df71ac4df5e2c7ec01..a9dda8e0f9f9c2c14859b027fcd80b1b88abdeda 100644 (file)
@@ -391,7 +391,7 @@ static int acpi_device_remove(struct device * dev)
                        acpi_drv->ops.remove(acpi_dev, acpi_dev->removal_type);
        }
        acpi_dev->driver = NULL;
-       acpi_driver_data(dev) = NULL;
+       acpi_dev->driver_data = NULL;
 
        put_device(dev);
        return 0;
@@ -544,7 +544,7 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver)
        result = driver->ops.add(device);
        if (result) {
                device->driver = NULL;
-               acpi_driver_data(device) = NULL;
+               device->driver_data = NULL;
                return result;
        }
 
@@ -751,6 +751,16 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
        if (!acpi_match_device_ids(device, button_device_ids))
                device->wakeup.flags.run_wake = 1;
 
+       /*
+        * Don't set Power button GPE as run_wake
+        * if Fixed Power button is used
+        */
+       if (!strcmp(device->pnp.hardware_id, "PNP0C0C") &&
+               !(acpi_gbl_FADT.flags & ACPI_FADT_POWER_BUTTON)) {
+               device->wakeup.flags.run_wake = 0;
+               device->wakeup.flags.valid = 0;
+       }
+
       end:
        if (ACPI_FAILURE(status))
                device->flags.wake_capable = 0;
@@ -1555,7 +1565,6 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
        return result;
 }
 
-int __init acpi_boot_ec_enable(void);
 
 static int __init acpi_scan_init(void)
 {
@@ -1589,9 +1598,6 @@ static int __init acpi_scan_init(void)
         */
        result = acpi_bus_scan_fixed(acpi_root);
 
-       /* EC region might be needed at bus_scan, so enable it now */
-       acpi_boot_ec_enable();
-
        if (!result)
                result = acpi_bus_scan(acpi_root, &ops);