Commit 13eea77b authored by Pavel Machek's avatar Pavel Machek Committed by Linus Torvalds

[PATCH] power/disk.c: small fixups

power_down may never ever fail, so it does not really need to return
anything.  Kill obsolete code and fixup old comments.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e0e74993
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* *
* Copyright (c) 2003 Patrick Mochel * Copyright (c) 2003 Patrick Mochel
* Copyright (c) 2003 Open Source Development Lab * Copyright (c) 2003 Open Source Development Lab
* Copyright (c) 2004 Pavel Machek <pavel@suse.cz>
* *
* This file is released under the GPLv2. * This file is released under the GPLv2.
* *
...@@ -41,7 +42,7 @@ char resume_file[256] = CONFIG_PM_STD_PARTITION; ...@@ -41,7 +42,7 @@ char resume_file[256] = CONFIG_PM_STD_PARTITION;
* there ain't no turning back. * there ain't no turning back.
*/ */
static int power_down(u32 mode) static void power_down(u32 mode)
{ {
unsigned long flags; unsigned long flags;
int error = 0; int error = 0;
...@@ -67,7 +68,6 @@ static int power_down(u32 mode) ...@@ -67,7 +68,6 @@ static int power_down(u32 mode)
after resume. */ after resume. */
printk(KERN_CRIT "Please power me down manually\n"); printk(KERN_CRIT "Please power me down manually\n");
while(1); while(1);
return 0;
} }
...@@ -162,7 +162,7 @@ static int prepare(void) ...@@ -162,7 +162,7 @@ static int prepare(void)
* *
* If we're going through the firmware, then get it over with quickly. * If we're going through the firmware, then get it over with quickly.
* *
* If not, then call pmdis to do it's thing, then figure out how * If not, then call swsusp to do it's thing, then figure out how
* to power down the system. * to power down the system.
*/ */
...@@ -184,18 +184,9 @@ int pm_suspend_disk(void) ...@@ -184,18 +184,9 @@ int pm_suspend_disk(void)
if (in_suspend) { if (in_suspend) {
pr_debug("PM: writing image.\n"); pr_debug("PM: writing image.\n");
/*
* FIXME: Leftover from swsusp. Are they necessary?
*/
mb();
barrier();
error = swsusp_write(); error = swsusp_write();
if (!error) { if (!error)
error = power_down(pm_disk_mode); power_down(pm_disk_mode);
pr_debug("PM: Power down failed.\n");
}
} else } else
pr_debug("PM: Image restored successfully.\n"); pr_debug("PM: Image restored successfully.\n");
swsusp_free(); swsusp_free();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment