From 671663657740d7d48fffcd08ee23f4e3156011e9 Mon Sep 17 00:00:00 2001 From: "Barry K. Nathan" Date: Mon, 10 Jan 2005 17:12:47 -0800 Subject: [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 Acked-by: Pavel Machek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/power/swsusp.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.3