From: Eric W. Biederman Date: Tue, 26 Jul 2005 18:01:17 +0000 (-0600) Subject: [PATCH] swpsuspend: Have suspend to disk use factors of sys_reboot X-Git-Tag: v2.6.13-rc4~48 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fdde86ac50357b6a811e3574e47d189e81a21444;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 3ec789c6b53..664eb0469b6 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c @@ -59,16 +59,13 @@ static void power_down(suspend_disk_method_t mode) 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");