aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/sleep/main.c')
-rw-r--r--drivers/acpi/sleep/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
index c58dd0bb5506..f20b0ab9ef54 100644
--- a/drivers/acpi/sleep/main.c
+++ b/drivers/acpi/sleep/main.c
@@ -230,6 +230,12 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = {
230#endif /* CONFIG_SUSPEND */ 230#endif /* CONFIG_SUSPEND */
231 231
232#ifdef CONFIG_HIBERNATION 232#ifdef CONFIG_HIBERNATION
233static int acpi_hibernation_start(void)
234{
235 acpi_target_sleep_state = ACPI_STATE_S4;
236 return 0;
237}
238
233static int acpi_hibernation_prepare(void) 239static int acpi_hibernation_prepare(void)
234{ 240{
235 return acpi_sleep_prepare(ACPI_STATE_S4); 241 return acpi_sleep_prepare(ACPI_STATE_S4);
@@ -258,6 +264,8 @@ static void acpi_hibernation_finish(void)
258 264
259 /* reset firmware waking vector */ 265 /* reset firmware waking vector */
260 acpi_set_firmware_waking_vector((acpi_physical_address) 0); 266 acpi_set_firmware_waking_vector((acpi_physical_address) 0);
267
268 acpi_target_sleep_state = ACPI_STATE_S0;
261} 269}
262 270
263static int acpi_hibernation_pre_restore(void) 271static int acpi_hibernation_pre_restore(void)
@@ -275,9 +283,11 @@ static void acpi_hibernation_restore_cleanup(void)
275} 283}
276 284
277static struct hibernation_ops acpi_hibernation_ops = { 285static struct hibernation_ops acpi_hibernation_ops = {
286 .start = acpi_hibernation_start,
287 .pre_snapshot = acpi_hibernation_prepare,
288 .finish = acpi_hibernation_finish,
278 .prepare = acpi_hibernation_prepare, 289 .prepare = acpi_hibernation_prepare,
279 .enter = acpi_hibernation_enter, 290 .enter = acpi_hibernation_enter,
280 .finish = acpi_hibernation_finish,
281 .pre_restore = acpi_hibernation_pre_restore, 291 .pre_restore = acpi_hibernation_pre_restore,
282 .restore_cleanup = acpi_hibernation_restore_cleanup, 292 .restore_cleanup = acpi_hibernation_restore_cleanup,
283}; 293};