diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-23 22:35:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-23 22:35:16 -0700 |
commit | 686c4cbb10fc0e75b29b097290b4f7fc3f010b9e (patch) | |
tree | 3361f14eee716d5512a0c423ec89631a5b976ef4 /kernel/power/hibernate.c | |
parent | b07ad9967f40b164af77205027352ba53729cf5a (diff) | |
parent | 19234c0819da0e043a02710488dfd9b242b42eba (diff) | |
download | blackbird-op-linux-686c4cbb10fc0e75b29b097290b4f7fc3f010b9e.tar.gz blackbird-op-linux-686c4cbb10fc0e75b29b097290b4f7fc3f010b9e.zip |
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM: Add missing syscore_suspend() and syscore_resume() calls
PM: Fix error code paths executed after failing syscore_suspend()
Diffstat (limited to 'kernel/power/hibernate.c')
-rw-r--r-- | kernel/power/hibernate.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c index aeabd26e3342..50aae660174d 100644 --- a/kernel/power/hibernate.c +++ b/kernel/power/hibernate.c @@ -273,8 +273,11 @@ static int create_image(int platform_mode) local_irq_disable(); error = sysdev_suspend(PMSG_FREEZE); - if (!error) + if (!error) { error = syscore_suspend(); + if (error) + sysdev_resume(); + } if (error) { printk(KERN_ERR "PM: Some system devices failed to power down, " "aborting hibernation\n"); @@ -407,8 +410,11 @@ static int resume_target_kernel(bool platform_mode) local_irq_disable(); error = sysdev_suspend(PMSG_QUIESCE); - if (!error) + if (!error) { error = syscore_suspend(); + if (error) + sysdev_resume(); + } if (error) goto Enable_irqs; |