aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 40d56a31245e..b98b80ccf437 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -97,25 +97,26 @@ static int suspend_prepare(suspend_state_t state)
97 } 97 }
98 } 98 }
99 99
100 if (pm_ops->prepare) {
101 if ((error = pm_ops->prepare(state)))
102 goto Thaw;
103 }
104
105 suspend_console(); 100 suspend_console();
106 error = device_suspend(PMSG_SUSPEND); 101 error = device_suspend(PMSG_SUSPEND);
107 if (error) { 102 if (error) {
108 printk(KERN_ERR "Some devices failed to suspend\n"); 103 printk(KERN_ERR "Some devices failed to suspend\n");
109 goto Resume_devices; 104 goto Resume_console;
110 } 105 }
106 if (pm_ops->prepare) {
107 if ((error = pm_ops->prepare(state)))
108 goto Resume_devices;
109 }
110
111 error = disable_nonboot_cpus(); 111 error = disable_nonboot_cpus();
112 if (!error) 112 if (!error)
113 return 0; 113 return 0;
114 114
115 enable_nonboot_cpus(); 115 enable_nonboot_cpus();
116 Resume_devices:
117 pm_finish(state); 116 pm_finish(state);
117 Resume_devices:
118 device_resume(); 118 device_resume();
119 Resume_console:
119 resume_console(); 120 resume_console();
120 Thaw: 121 Thaw:
121 thaw_processes(); 122 thaw_processes();