diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/sleep/main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index c37c4ead95c9..31e8e58e1cec 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -281,7 +281,7 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { | |||
281 | #endif /* CONFIG_SUSPEND */ | 281 | #endif /* CONFIG_SUSPEND */ |
282 | 282 | ||
283 | #ifdef CONFIG_HIBERNATION | 283 | #ifdef CONFIG_HIBERNATION |
284 | static int acpi_hibernation_start(void) | 284 | static int acpi_hibernation_begin(void) |
285 | { | 285 | { |
286 | acpi_target_sleep_state = ACPI_STATE_S4; | 286 | acpi_target_sleep_state = ACPI_STATE_S4; |
287 | return 0; | 287 | return 0; |
@@ -341,6 +341,15 @@ static void acpi_hibernation_finish(void) | |||
341 | acpi_target_sleep_state = ACPI_STATE_S0; | 341 | acpi_target_sleep_state = ACPI_STATE_S0; |
342 | } | 342 | } |
343 | 343 | ||
344 | static void acpi_hibernation_end(void) | ||
345 | { | ||
346 | /* | ||
347 | * This is necessary in case acpi_hibernation_finish() is not called | ||
348 | * during a failing transition to the sleep state. | ||
349 | */ | ||
350 | acpi_target_sleep_state = ACPI_STATE_S0; | ||
351 | } | ||
352 | |||
344 | static int acpi_hibernation_pre_restore(void) | 353 | static int acpi_hibernation_pre_restore(void) |
345 | { | 354 | { |
346 | acpi_status status; | 355 | acpi_status status; |
@@ -356,7 +365,8 @@ static void acpi_hibernation_restore_cleanup(void) | |||
356 | } | 365 | } |
357 | 366 | ||
358 | static struct platform_hibernation_ops acpi_hibernation_ops = { | 367 | static struct platform_hibernation_ops acpi_hibernation_ops = { |
359 | .start = acpi_hibernation_start, | 368 | .begin = acpi_hibernation_begin, |
369 | .end = acpi_hibernation_end, | ||
360 | .pre_snapshot = acpi_hibernation_prepare, | 370 | .pre_snapshot = acpi_hibernation_prepare, |
361 | .finish = acpi_hibernation_finish, | 371 | .finish = acpi_hibernation_finish, |
362 | .prepare = acpi_hibernation_prepare, | 372 | .prepare = acpi_hibernation_prepare, |