aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/swsusp.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2006-08-15 02:11:08 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-26 00:08:37 -0400
commitf1cc0a894c963923b766eb2d455747495e6e982d (patch)
treecccd3a2c337f0117d664e204eedf5c222a6c43f7 /kernel/power/swsusp.c
parent185849991d592497e43bcd264c6152af1261ffe2 (diff)
PM: issue PM_EVENT_PRETHAW
This patch is the first of this series that should actually change any behavior ... by issuing the new event, now tha the rest of the kernel is prepared to receive it. This converts the PM core to issue the new PRETHAW message, which the rest of the kernel is now ready to receive. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r--kernel/power/swsusp.c9
1 files changed, 8 insertions, 1 deletions
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();