Skip to content

Commit

Permalink
[PATCH] Use kernel_power_off in sysrq-o
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
ebiederm authored and Linus Torvalds committed Jul 26, 2005
1 parent 62b3a04 commit ff31977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/power/poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/workqueue.h>
#include <linux/reboot.h>

/*
* When the user hits Sys-Rq o to power down the machine this is the
Expand All @@ -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);
Expand Down

0 comments on commit ff31977

Please sign in to comment.