summaryrefslogtreecommitdiff
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-12-17 12:22:43 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-12-18 10:51:16 +0100
commit7edcbbf29006be46d5dbce5bac9aae73f3056d14 (patch)
tree853800ab5959927ef86179e44ac606ce3e2ccc64 /drivers/acpi/sleep.c
parentf941d3e41da7f86bdb9dcc1977c2bcc6b89bfe47 (diff)
ACPI: PM: Loop in full LPS0 mode only
After a previous change, all non-wakeup GPEs are disabled for suspend-to-idle unless full Low-Power S0 (LPS0) mode is in use, so it is not necessary to do anything in acpi_s2idle_wake() unless in full LPS0 mode, which is only when lps0_device_handle is set. Modify the code accordingly. Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 74c489047f57..403c4ff15349 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -985,6 +985,8 @@ static int acpi_s2idle_prepare(void)
static void acpi_s2idle_wake(void)
{
+ if (!lps0_device_handle)
+ return;
if (pm_debug_messages_on)
lpi_check_constraints();
@@ -1003,8 +1005,7 @@ static void acpi_s2idle_wake(void)
* takes too much time for EC wakeup events to survive, so look
* for them now.
*/
- if (lps0_device_handle)
- acpi_ec_dispatch_gpe();
+ acpi_ec_dispatch_gpe();
}
}