aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/poweroff.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-07-26 13:47:32 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-26 17:35:43 -0400
commitff31977782a05504f2586ec9e3e5ab4b09a4c893 (patch)
tree3cf1d3ab1be8688a4de9bca44d8dac276f6038e2 /kernel/power/poweroff.c
parent62b3a04d75d2dc9480d5ad3b60f4258e548a6a83 (diff)
[PATCH] Use kernel_power_off in sysrq-o
We already do all of the gymnastics to run from process context to call the power off code so call into the power off code cleanly. This especially helps acpi as part of it's shutdown logic should run acpi_shutdown called from device_shutdown which was not being called from here. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/power/poweroff.c')
-rw-r--r--kernel/power/poweroff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c
index 715081b2d829..7a4144ba3afd 100644
--- a/kernel/power/poweroff.c
+++ b/kernel/power/poweroff.c
@@ -9,6 +9,7 @@
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/pm.h> 10#include <linux/pm.h>
11#include <linux/workqueue.h> 11#include <linux/workqueue.h>
12#include <linux/reboot.h>
12 13
13/* 14/*
14 * When the user hits Sys-Rq o to power down the machine this is the 15 * When the user hits Sys-Rq o to power down the machine this is the
@@ -17,8 +18,7 @@
17 18
18static void do_poweroff(void *dummy) 19static void do_poweroff(void *dummy)
19{ 20{
20 if (pm_power_off) 21 kernel_power_off();
21 pm_power_off();
22} 22}
23 23
24static DECLARE_WORK(poweroff_work, do_poweroff, NULL); 24static DECLARE_WORK(poweroff_work, do_poweroff, NULL);