From: "Barry K. Nathan" <barryn@pobox.com>

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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/kernel/power/swsusp.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN kernel/power/swsusp.c~swsusp-properly-suspend-and-resume-all-devices kernel/power/swsusp.c
--- 25/kernel/power/swsusp.c~swsusp-properly-suspend-and-resume-all-devices	2005-01-05 15:06:33.146188640 -0800
+++ 25-akpm/kernel/power/swsusp.c	2005-01-05 15:06:33.151187880 -0800
@@ -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;
 }
_