From: Eric W. Biederman Date: Tue, 26 Jul 2005 17:47:32 +0000 (-0600) Subject: [PATCH] Use kernel_power_off in sysrq-o X-Git-Tag: v2.6.13-rc4~54 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff31977782a05504f2586ec9e3e5ab4b09a4c893;p=linux-2.6 [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 Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/poweroff.c b/kernel/power/poweroff.c index 715081b2d8..7a4144ba3a 100644 --- a/kernel/power/poweroff.c +++ b/kernel/power/poweroff.c @@ -9,6 +9,7 @@ #include #include #include +#include /* * When the user hits Sys-Rq o to power down the machine this is the @@ -17,8 +18,7 @@ static void do_poweroff(void *dummy) { - if (pm_power_off) - pm_power_off(); + kernel_power_off(); } static DECLARE_WORK(poweroff_work, do_poweroff, NULL);