From: Zhang Rui Date: Fri, 12 Sep 2008 03:12:25 +0000 (+0800) Subject: ACPI: don't enable control method power button as wakeup device when Fixed Power... X-Git-Tag: v2.6.28-rc1~26^2~23^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=faee816b1502385dc9bc5abf2960d1cc645844d1;p=linux-2.6-omap-h63xx.git ACPI: don't enable control method power button as wakeup device when Fixed Power button is used 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 Signed-off-by: Zhang Rui Signed-off-by: Len Brown --- diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index f6f52c1a2ab..5ce14aee5e3 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -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;