]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPI: don't enable control method power button as wakeup device when Fixed Power...
authorZhang Rui <rui.zhang@intel.com>
Fri, 12 Sep 2008 03:12:25 +0000 (11:12 +0800)
committerLen Brown <len.brown@intel.com>
Tue, 7 Oct 2008 02:31:11 +0000 (22:31 -0400)
don't enable control method power button as wakeup device
when Fixed Power button is used.

http://bugzilla.kernel.org/show_bug.cgi?id=10503

Tested-by: walken@zoy.org <walken@zoy.org>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/scan.c

index f6f52c1a2abad88cecc73a41ea65c4bddfafc0ae..5ce14aee5e3f3b871d2a60043a7d11551cdf1397 100644 (file)
@@ -744,6 +744,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;