]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/hardware/hwsleep.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / drivers / acpi / hardware / hwsleep.c
index 57901ca3ade911fea9ae132dd7aa77844025372b..76c525dc590b3b91aedfe0c99d6526eabfe5bbc9 100644 (file)
@@ -152,7 +152,6 @@ acpi_get_firmware_waking_vector(acpi_physical_address * physical_address)
 
 ACPI_EXPORT_SYMBOL(acpi_get_firmware_waking_vector)
 #endif
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_enter_sleep_state_prep
@@ -235,6 +234,14 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
                                "While executing method _SST"));
        }
 
+       /*
+        * 1) Disable/Clear all GPEs
+        */
+       status = acpi_hw_disable_all_gpes();
+       if (ACPI_FAILURE(status)) {
+               return_ACPI_STATUS(status);
+       }
+
        return_ACPI_STATUS(AE_OK);
 }
 
@@ -290,13 +297,13 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
        }
 
        /*
-        * 1) Disable/Clear all GPEs
         * 2) Enable all wakeup GPEs
         */
        status = acpi_hw_disable_all_gpes();
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
+
        acpi_gbl_system_awake_and_running = FALSE;
 
        status = acpi_hw_enable_all_wakeup_gpes();