tree b5e8d3d295da10b84ba6538359e20c5435b3085a
parent 804ebf46d51653e736108074473d9493398f2df9
author Eric W. Biederman <[EMAIL PROTECTED]> Wed, 27 Jul 2005 00:01:17 -0600
committer Linus Torvalds <[EMAIL PROTECTED]> Wed, 27 Jul 2005 04:35:44 -0700

[PATCH] swpsuspend: Have suspend to disk use factors of sys_reboot

The suspend to disk code was a poor copy of the code in
sys_reboot now that we have kernel_power_off, kernel_restart
and kernel_halt use them instead of poorly duplicating them inline.

Signed-off-by: Eric W. Biederman <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 kernel/power/disk.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/kernel/power/disk.c b/kernel/power/disk.c
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -59,16 +59,13 @@ static void power_down(suspend_disk_meth
                error = pm_ops->enter(PM_SUSPEND_DISK);
                break;
        case PM_DISK_SHUTDOWN:
-               printk("Powering off system\n");
-               device_shutdown();
-               machine_power_off();
+               kernel_power_off();
                break;
        case PM_DISK_REBOOT:
-               device_shutdown();
-               machine_restart(NULL);
+               kernel_restart(NULL);
                break;
        }
-       machine_halt();
+       kernel_halt();
        /* Valid image is on the disk, if we continue we risk serious data 
corruption
           after resume. */
        printk(KERN_CRIT "Please power me down manually\n");
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to