Merge tag 'x86-platform-2020-06-01' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / acpi / sleep.c
index 3850704..fd9d4e8 100644 (file)
@@ -980,13 +980,6 @@ static int acpi_s2idle_prepare_late(void)
        return 0;
 }
 
-static void acpi_s2idle_sync(void)
-{
-       /* The EC driver uses special workqueues that need to be flushed. */
-       acpi_ec_flush_work();
-       acpi_os_wait_events_complete(); /* synchronize Notify handling */
-}
-
 static bool acpi_s2idle_wake(void)
 {
        if (!acpi_sci_irq_valid())
@@ -1018,7 +1011,7 @@ static bool acpi_s2idle_wake(void)
                        return true;
 
                /*
-                * Cancel the wakeup and process all pending events in case
+                * Cancel the SCI wakeup and process all pending events in case
                 * there are any wakeup ones in there.
                 *
                 * Note that if any non-EC GPEs are active at this point, the
@@ -1026,8 +1019,7 @@ static bool acpi_s2idle_wake(void)
                 * should be missed by canceling the wakeup here.
                 */
                pm_system_cancel_wakeup();
-
-               acpi_s2idle_sync();
+               acpi_os_wait_events_complete();
 
                /*
                 * The SCI is in the "suspended" state now and it cannot produce
@@ -1060,7 +1052,8 @@ static void acpi_s2idle_restore(void)
         * of GPEs.
         */
        acpi_os_wait_events_complete(); /* synchronize GPE processing */
-       acpi_s2idle_sync();
+       acpi_ec_flush_work(); /* flush the EC driver's workqueues */
+       acpi_os_wait_events_complete(); /* synchronize Notify handling */
 
        s2idle_wakeup = false;