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]> --- kernel/power/disk.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) 78a2f83d732e327874fe73728d5667875dfeea46 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 linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH 16/23] swpsuspend: Have suspend to disk use factors of sys_reboot
- From: Andrew Morton <[email protected]>
- [PATCH 17/23] pcwd.c: Call kernel_power_off not machine_power_off
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH 16/23] swpsuspend: Have suspend to disk use factors of sys_reboot
- References:
- [PATCH 0/23] reboot-fixes
- From: [email protected] (Eric W. Biederman)
- [PATCH 1/23] Add missing device_suspsend(PMSG_FREEZE) calls.
- From: [email protected] (Eric W. Biederman)
- [PATCH 2/23] Refactor sys_reboot into reusable parts
- From: [email protected] (Eric W. Biederman)
- [PATCH 3/23] Make ctrl_alt_del call kernel_restart to get a proper reboot.
- From: [email protected] (Eric W. Biederman)
- [PATCH 4/23] Add emergency_restart()
- From: [email protected] (Eric W. Biederman)
- [PATCH 5/23] Fix the arguments to machine_restart on cris
- From: [email protected] (Eric W. Biederman)
- [PATCH 6/23] Don't export machine_restart, machine_halt, or machine_power_off.
- From: [email protected] (Eric W. Biederman)
- [PATCH 7/23] i386: Implement machine_emergency_reboot
- From: [email protected] (Eric W. Biederman)
- [PATCH 8/23] x86_64: Fix reboot_force
- From: [email protected] (Eric W. Biederman)
- [PATCH 9/23] x86_64: Implemenent machine_emergency_restart
- From: [email protected] (Eric W. Biederman)
- [PATCH 10/23] Use kernel_power_off in sysrq-o
- From: [email protected] (Eric W. Biederman)
- [PATCH 11/23] Call emergency_reboot from panic
- From: [email protected] (Eric W. Biederman)
- [PATCH 12/23] Update sysrq-B to use emergency_restart()
- From: [email protected] (Eric W. Biederman)
- [PATCH 13/23] Fix watchdog drivers to call emergency_reboot()
- From: [email protected] (Eric W. Biederman)
- [PATCH 14/23] In hangcheck-timer.c call emergency_restart()
- From: [email protected] (Eric W. Biederman)
- [PATCH 15/23] 68328serial: sysrq should use emergency_reboot
- From: [email protected] (Eric W. Biederman)
- [PATCH 0/23] reboot-fixes
- Prev by Date: Re: [2.6 patch] schedule obsolete OSS drivers for removal
- Next by Date: [PATCH 17/23] pcwd.c: Call kernel_power_off not machine_power_off
- Previous by thread: [PATCH 15/23] 68328serial: sysrq should use emergency_reboot
- Next by thread: [PATCH 17/23] pcwd.c: Call kernel_power_off not machine_power_off
- Index(es):