summaryrefslogtreecommitdiff
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index b9494fb3769c..62348ec2a807 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -993,10 +993,16 @@ static bool acpi_s2idle_wake(void)
return true;
/*
- * If there are no EC events to process, the wakeup is regarded
- * as a genuine one.
+ * If there are no EC events to process and at least one of the
+ * other enabled GPEs is active, the wakeup is regarded as a
+ * genuine one.
+ *
+ * Note that the checks below must be carried out in this order
+ * to avoid returning prematurely due to a change of the EC GPE
+ * status bit from unset to set between the checks with the
+ * status bits of all the other GPEs unset.
*/
- if (!acpi_ec_dispatch_gpe())
+ if (acpi_any_gpe_status_set() && !acpi_ec_dispatch_gpe())
return true;
/*