]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/sleep/main.c
ACPI: Separate invocations of _GTS and _BFS from _PTS and _WAK
[linux-2.6-omap-h63xx.git] / drivers / acpi / sleep / main.c
index e2e4e617952b1745700075c93510bc3b359f8d7d..fdd8139b3f98926ce8f37061ae9e515e585dbbc7 100644 (file)
@@ -139,6 +139,9 @@ static int acpi_pm_enter(suspend_state_t pm_state)
                break;
        }
 
+       /* Reprogram control registers and execute _BFS */
+       acpi_leave_sleep_state_prep(acpi_state);
+
        /* ACPI 3.0 specs (P62) says that it's the responsabilty
         * of the OSPM to clear the status bit [ implying that the
         * POWER_BUTTON event should not reach userspace ]
@@ -272,6 +275,8 @@ static int acpi_hibernation_enter(void)
        acpi_enable_wakeup_device(ACPI_STATE_S4);
        /* This shouldn't return.  If it returns, we have a problem */
        status = acpi_enter_sleep_state(ACPI_STATE_S4);
+       /* Reprogram control registers and execute _BFS */
+       acpi_leave_sleep_state_prep(ACPI_STATE_S4);
        local_irq_restore(flags);
 
        return ACPI_SUCCESS(status) ? 0 : -EFAULT;
@@ -284,6 +289,8 @@ static void acpi_hibernation_leave(void)
         * enable it here.
         */
        acpi_enable();
+       /* Reprogram control registers and execute _BFS */
+       acpi_leave_sleep_state_prep(ACPI_STATE_S4);
 }
 
 static void acpi_hibernation_finish(void)