[ACPICA] Update to version 20181003. CORE-15222
[reactos.git] / drivers / bus / acpi / acpica / hardware / hwsleep.c
index 8fce247..02a420f 100644 (file)
@@ -90,17 +90,22 @@ AcpiHwLegacySleep (
         return_ACPI_STATUS (Status);
     }
 
-    /*
-     * 1) Disable all GPEs
-     * 2) Enable all wakeup GPEs
-     */
+    /* Disable all GPEs */
+
     Status = AcpiHwDisableAllGpes ();
     if (ACPI_FAILURE (Status))
     {
         return_ACPI_STATUS (Status);
     }
+    Status = AcpiHwClearAcpiStatus();
+    if (ACPI_FAILURE(Status))
+    {
+        return_ACPI_STATUS(Status);
+    }
     AcpiGbl_SystemAwakeAndRunning = FALSE;
 
+    /* Enable all wakeup GPEs */
+
     Status = AcpiHwEnableAllWakeupGpes ();
     if (ACPI_FAILURE (Status))
     {