ACPI / Wakeup: Enable button GPEs unconditionally during initialization
commit640ac0ff9c192e857f939f8ac7d5a3e5f174f93a
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 17 Feb 2011 09:34:41 +0000 (17 10:34 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Feb 2011 22:54:29 +0000 (24 14:54 -0800)
tree332640ab6970295f514f1d3cb9cffc3c9ba25342
parentba5e8f48f799e61d865adb2830bb78fce3267762
ACPI / Wakeup: Enable button GPEs unconditionally during initialization

This is a backport of mainline kernel commit
2a5d24286e8bdafdc272b37ec5bdd9e977b3767c.

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: https://bugzilla.kernel.org/show_bug.cgi?id=27372
Reported-and-tested-by: Ferenc Wágner <wferi@niif.hu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/wakeup.c