Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280356
b: refs/heads/master
c: 953a206
h: refs/heads/master
v: v3
  • Loading branch information
Srivatsa S. Bhat authored and Rafael J. Wysocki committed Nov 23, 2011
1 parent 7686680 commit 4d5b42e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 64e94aafb6a5c4f419e9b8f93950914b5ac162a9
refs/heads/master: 953a206393b1533ceb0e7d725cc5a8c8d7ed97dd
22 changes: 9 additions & 13 deletions trunk/kernel/power/hibernate.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ static int create_image(int platform_mode)
*/
int hibernation_snapshot(int platform_mode)
{
pm_message_t msg = PMSG_RECOVER;
pm_message_t msg;
int error;

error = platform_begin(platform_mode);
Expand Down Expand Up @@ -362,26 +362,26 @@ int hibernation_snapshot(int platform_mode)

error = dpm_prepare(PMSG_FREEZE);
if (error) {
dpm_complete(msg);
dpm_complete(PMSG_RECOVER);
goto Cleanup;
}

suspend_console();
pm_restrict_gfp_mask();

error = dpm_suspend(PMSG_FREEZE);
if (error)
goto Recover_platform;

if (hibernation_test(TEST_DEVICES))
goto Recover_platform;
if (error || hibernation_test(TEST_DEVICES))
platform_recover(platform_mode);
else
error = create_image(platform_mode);

error = create_image(platform_mode);
/*
* Control returns here (1) after the image has been created or the
* In the case that we call create_image() above, the control
* returns here (1) after the image has been created or the
* image creation has failed and (2) after a successful restore.
*/

Resume_devices:
/* We may need to release the preallocated image pages here. */
if (error || !in_suspend)
swsusp_free();
Expand All @@ -399,10 +399,6 @@ int hibernation_snapshot(int platform_mode)
platform_end(platform_mode);
return error;

Recover_platform:
platform_recover(platform_mode);
goto Resume_devices;

Cleanup:
swsusp_free();
goto Close;
Expand Down

0 comments on commit 4d5b42e

Please sign in to comment.