aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-07-26 14:01:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 17:35:44 -0400
commitfdde86ac50357b6a811e3574e47d189e81a21444 (patch)
treeb5e8d3d295da10b84ba6538359e20c5435b3085a /kernel/power/disk.c
parent804ebf46d51653e736108074473d9493398f2df9 (diff)
[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 <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r--kernel/power/disk.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 3ec789c6b537..664eb0469b6e 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -59,16 +59,13 @@ static void power_down(suspend_disk_method_t mode)
59 error = pm_ops->enter(PM_SUSPEND_DISK); 59 error = pm_ops->enter(PM_SUSPEND_DISK);
60 break; 60 break;
61 case PM_DISK_SHUTDOWN: 61 case PM_DISK_SHUTDOWN:
62 printk("Powering off system\n"); 62 kernel_power_off();
63 device_shutdown();
64 machine_power_off();
65 break; 63 break;
66 case PM_DISK_REBOOT: 64 case PM_DISK_REBOOT:
67 device_shutdown(); 65 kernel_restart(NULL);
68 machine_restart(NULL);
69 break; 66 break;
70 } 67 }
71 machine_halt(); 68 kernel_halt();
72 /* Valid image is on the disk, if we continue we risk serious data corruption 69 /* Valid image is on the disk, if we continue we risk serious data corruption
73 after resume. */ 70 after resume. */
74 printk(KERN_CRIT "Please power me down manually\n"); 71 printk(KERN_CRIT "Please power me down manually\n");