diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2005-10-30 15:00:01 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 17:37:15 -0800 |
commit | 0245b3e787dc3267a915e1f56419e7e9c197e148 (patch) | |
tree | 96a366f2fc732f42d4993dd177982e6b657d83aa /kernel/power/disk.c | |
parent | 2e32a43efdc8175579cc91e8b620ac331376a437 (diff) | |
download | blackbird-op-linux-0245b3e787dc3267a915e1f56419e7e9c197e148.tar.gz blackbird-op-linux-0245b3e787dc3267a915e1f56419e7e9c197e148.zip |
[PATCH] swsusp: two simplifications
The following patch simplifies the progress meter in disk.c:free_some_memory()
and makes disk.c:pm_suspend_disk() call device_resume() explicitly in the
suspend path.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r-- | kernel/power/disk.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 44ef5e799df0..027322a564f4 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -92,10 +92,7 @@ static void free_some_memory(void) printk("Freeing memory... "); while ((tmp = shrink_all_memory(10000))) { pages += tmp; - printk("\b%c", p[i]); - i++; - if (i > 3) - i = 0; + printk("\b%c", p[i++ % 4]); } printk("\bdone (%li pages freed)\n", pages); } @@ -177,13 +174,12 @@ int pm_suspend_disk(void) goto Done; if (in_suspend) { + device_resume(); pr_debug("PM: writing image.\n"); error = swsusp_write(); if (!error) power_down(pm_disk_mode); else { - /* swsusp_write can not fail in device_resume, - no need to do second device_resume */ swsusp_free(); unprepare_processes(); return error; |