diff options
| author | Barry K. Nathan <barryn@pobox.com> | 2005-01-10 17:12:47 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-10 17:12:47 -0800 |
| commit | 671663657740d7d48fffcd08ee23f4e3156011e9 (patch) | |
| tree | 37b62bb282e567c5515e5859e87927c908c4bf3c | |
| parent | a20a26f360e95684260c4f0036779aed77f9327b (diff) | |
[PATCH] swsusp: properly suspend and resume all devices
During resume, my previous patch switches over to the saved swsusp image
without suspending all devices first. This patch fixes that oversight, so
that the state of the hardware upon resume more closely matches the state
it had at suspend time.
While my previous patch alone seemed to work fine in my testing, it is
not fully correct without this as well.
Signed-off-by: Barry K. Nathan <barryn@pobox.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| -rw-r--r-- | kernel/power/swsusp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index 210d102a7dc4..8ec3dadb0b27 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c @@ -878,6 +878,7 @@ int swsusp_resume(void) { int error; local_irq_disable(); + device_power_down(PM_SUSPEND_DISK); /* We'll ignore saved state, but this gets preempt count (etc) right */ save_processor_state(); error = swsusp_arch_resume(); @@ -887,6 +888,7 @@ int swsusp_resume(void) BUG_ON(!error); restore_processor_state(); restore_highmem(); + device_power_up(); local_irq_enable(); return error; } |
