summaryrefslogtreecommitdiffstats
path: root/kernel/power
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-30 02:21:34 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-30 21:05:59 +0200
commit2a8a8ce651d3a88fdf83e2ed15633c8d19292108 (patch)
treeff98d7ff5d31ffeeacc117d910a63264a625efc7 /kernel/power
parente1253e5e3fcd61f1057ef8a39c8c64e6b82358b9 (diff)
downloadlinux-2a8a8ce651d3a88fdf83e2ed15633c8d19292108.tar.bz2
PM / sleep: Export dpm_suspend_late/noirq() and dpm_resume_early/noirq()
Subsequent change sets will add platform-related operations between dpm_suspend_late() and dpm_suspend_noirq() as well as between dpm_resume_noirq() and dpm_resume_early() in suspend_enter(), so export these functions for suspend_enter() to be able to call them separately and split the invocations of dpm_suspend_end() and dpm_resume_start() in there accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/suspend.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index e837dd6783c6..58ae98b7dc2b 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -265,11 +265,16 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
if (error)
goto Platform_finish;
- error = dpm_suspend_end(PMSG_SUSPEND);
+ error = dpm_suspend_late(PMSG_SUSPEND);
if (error) {
- printk(KERN_ERR "PM: Some devices failed to power down\n");
+ printk(KERN_ERR "PM: late suspend of devices failed\n");
goto Platform_finish;
}
+ error = dpm_suspend_noirq(PMSG_SUSPEND);
+ if (error) {
+ printk(KERN_ERR "PM: noirq suspend of devices failed\n");
+ goto Devices_early_resume;
+ }
error = platform_suspend_prepare_late(state);
if (error)
goto Platform_wake;
@@ -319,7 +324,10 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
Platform_wake:
platform_suspend_wake(state);
- dpm_resume_start(PMSG_RESUME);
+ dpm_resume_noirq(PMSG_RESUME);
+
+ Devices_early_resume:
+ dpm_resume_early(PMSG_RESUME);
Platform_finish:
platform_suspend_finish(state);