diff options
authorRafael J. Wysocki <>2011-02-12 01:39:53 +0100
committerRafael J. Wysocki <>2011-02-12 01:39:53 +0100
commit2a5d24286e8bdafdc272b37ec5bdd9e977b3767c (patch)
parent2d55951368faa32ff098398c56780ebb6405a3d9 (diff)
ACPI / Wakeup: Enable button GPEs unconditionally during initialization
Commit 9630bdd (ACPI: Use GPE reference counting to support shared GPEs) introduced a suspend regression where boxes resume immediately after being suspended due to the lid or sleep button wakeup status not being cleared properly. This happens if the GPEs corresponding to those devices are not enabled all the time, which apparently is expected by some BIOSes. To fix this problem, enable button and lid GPEs unconditionally during initialization and keep them enabled all the time, regardless of whether or not the ACPI button driver is used. References: Reported-and-tested-by: Ferenc W√°gner <> Cc: Signed-off-by: Rafael J. Wysocki <>
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c
index ed6501452507..7bfbe40bc43b 100644
--- a/drivers/acpi/wakeup.c
+++ b/drivers/acpi/wakeup.c
@@ -86,8 +86,12 @@ int __init acpi_wakeup_device_init(void)
struct acpi_device *dev = container_of(node,
struct acpi_device,
- if (device_can_wakeup(&dev->dev))
+ if (device_can_wakeup(&dev->dev)) {
+ /* Button GPEs are supposed to be always enabled. */
+ acpi_enable_gpe(dev->wakeup.gpe_device,
+ dev->wakeup.gpe_number);
device_set_wakeup_enable(&dev->dev, true);
+ }
return 0;