aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/power/disk.c4
-rw-r--r--kernel/power/swsusp.c9
-rw-r--r--kernel/power/user.c2
3 files changed, 11 insertions, 4 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index e13e74067845..a3c34fb14321 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -98,7 +98,7 @@ static void unprepare_processes(void)
98} 98}
99 99
100/** 100/**
101 * pm_suspend_disk - The granpappy of power management. 101 * pm_suspend_disk - The granpappy of hibernation power management.
102 * 102 *
103 * If we're going through the firmware, then get it over with quickly. 103 * If we're going through the firmware, then get it over with quickly.
104 * 104 *
@@ -207,7 +207,7 @@ static int software_resume(void)
207 207
208 pr_debug("PM: Preparing devices for restore.\n"); 208 pr_debug("PM: Preparing devices for restore.\n");
209 209
210 if ((error = device_suspend(PMSG_FREEZE))) { 210 if ((error = device_suspend(PMSG_PRETHAW))) {
211 printk("Some devices failed to suspend\n"); 211 printk("Some devices failed to suspend\n");
212 swsusp_free(); 212 swsusp_free();
213 goto Thaw; 213 goto Thaw;
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index 17f669c83012..62752899b1a1 100644
--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -248,6 +248,9 @@ int swsusp_suspend(void)
248 restore_processor_state(); 248 restore_processor_state();
249Restore_highmem: 249Restore_highmem:
250 restore_highmem(); 250 restore_highmem();
251 /* NOTE: device_power_up() is just a resume() for devices
252 * that suspended with irqs off ... no overall powerup.
253 */
251 device_power_up(); 254 device_power_up();
252Enable_irqs: 255Enable_irqs:
253 local_irq_enable(); 256 local_irq_enable();
@@ -257,8 +260,12 @@ Enable_irqs:
257int swsusp_resume(void) 260int swsusp_resume(void)
258{ 261{
259 int error; 262 int error;
263
260 local_irq_disable(); 264 local_irq_disable();
261 if (device_power_down(PMSG_FREEZE)) 265 /* NOTE: device_power_down() is just a suspend() with irqs off;
266 * it has no special "power things down" semantics
267 */
268 if (device_power_down(PMSG_PRETHAW))
262 printk(KERN_ERR "Some devices failed to power down, very bad\n"); 269 printk(KERN_ERR "Some devices failed to power down, very bad\n");
263 /* We'll ignore saved state, but this gets preempt count (etc) right */ 270 /* We'll ignore saved state, but this gets preempt count (etc) right */
264 save_processor_state(); 271 save_processor_state();
diff --git a/kernel/power/user.c b/kernel/power/user.c
index 3f1539fbe48a..5a8d060d7909 100644
--- a/kernel/power/user.c
+++ b/kernel/power/user.c
@@ -191,7 +191,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
191 } 191 }
192 down(&pm_sem); 192 down(&pm_sem);
193 pm_prepare_console(); 193 pm_prepare_console();
194 error = device_suspend(PMSG_FREEZE); 194 error = device_suspend(PMSG_PRETHAW);
195 if (!error) { 195 if (!error) {
196 error = swsusp_resume(); 196 error = swsusp_resume();
197 device_resume(); 197 device_resume();