aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r--kernel/power/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index d023b6b584e5..3398f4651aa1 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -269,11 +269,11 @@ int suspend_devices_and_enter(suspend_state_t state)
269 error = device_suspend(PMSG_SUSPEND); 269 error = device_suspend(PMSG_SUSPEND);
270 if (error) { 270 if (error) {
271 printk(KERN_ERR "PM: Some devices failed to suspend\n"); 271 printk(KERN_ERR "PM: Some devices failed to suspend\n");
272 goto Resume_console; 272 goto Recover_platform;
273 } 273 }
274 274
275 if (suspend_test(TEST_DEVICES)) 275 if (suspend_test(TEST_DEVICES))
276 goto Resume_devices; 276 goto Recover_platform;
277 277
278 if (suspend_ops->prepare) { 278 if (suspend_ops->prepare) {
279 error = suspend_ops->prepare(); 279 error = suspend_ops->prepare();
@@ -294,12 +294,16 @@ int suspend_devices_and_enter(suspend_state_t state)
294 suspend_ops->finish(); 294 suspend_ops->finish();
295 Resume_devices: 295 Resume_devices:
296 device_resume(PMSG_RESUME); 296 device_resume(PMSG_RESUME);
297 Resume_console:
298 resume_console(); 297 resume_console();
299 Close: 298 Close:
300 if (suspend_ops->end) 299 if (suspend_ops->end)
301 suspend_ops->end(); 300 suspend_ops->end();
302 return error; 301 return error;
302
303 Recover_platform:
304 if (suspend_ops->recover)
305 suspend_ops->recover();
306 goto Resume_devices;
303} 307}
304 308
305/** 309/**