diff options
Diffstat (limited to 'drivers/acpi/sleep/main.c')
-rw-r--r-- | drivers/acpi/sleep/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index e2e4e617952b..fdd8139b3f98 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -139,6 +139,9 @@ static int acpi_pm_enter(suspend_state_t pm_state) | |||
139 | break; | 139 | break; |
140 | } | 140 | } |
141 | 141 | ||
142 | /* Reprogram control registers and execute _BFS */ | ||
143 | acpi_leave_sleep_state_prep(acpi_state); | ||
144 | |||
142 | /* ACPI 3.0 specs (P62) says that it's the responsabilty | 145 | /* ACPI 3.0 specs (P62) says that it's the responsabilty |
143 | * of the OSPM to clear the status bit [ implying that the | 146 | * of the OSPM to clear the status bit [ implying that the |
144 | * POWER_BUTTON event should not reach userspace ] | 147 | * POWER_BUTTON event should not reach userspace ] |
@@ -272,6 +275,8 @@ static int acpi_hibernation_enter(void) | |||
272 | acpi_enable_wakeup_device(ACPI_STATE_S4); | 275 | acpi_enable_wakeup_device(ACPI_STATE_S4); |
273 | /* This shouldn't return. If it returns, we have a problem */ | 276 | /* This shouldn't return. If it returns, we have a problem */ |
274 | status = acpi_enter_sleep_state(ACPI_STATE_S4); | 277 | status = acpi_enter_sleep_state(ACPI_STATE_S4); |
278 | /* Reprogram control registers and execute _BFS */ | ||
279 | acpi_leave_sleep_state_prep(ACPI_STATE_S4); | ||
275 | local_irq_restore(flags); | 280 | local_irq_restore(flags); |
276 | 281 | ||
277 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; | 282 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; |
@@ -284,6 +289,8 @@ static void acpi_hibernation_leave(void) | |||
284 | * enable it here. | 289 | * enable it here. |
285 | */ | 290 | */ |
286 | acpi_enable(); | 291 | acpi_enable(); |
292 | /* Reprogram control registers and execute _BFS */ | ||
293 | acpi_leave_sleep_state_prep(ACPI_STATE_S4); | ||
287 | } | 294 | } |
288 | 295 | ||
289 | static void acpi_hibernation_finish(void) | 296 | static void acpi_hibernation_finish(void) |