From: Eric W. Biederman Date: Sat, 27 Aug 2005 06:56:18 +0000 (-0600) Subject: [PATCH] acpi_shutdown: Only prepare for power off on power_off X-Git-Tag: v2.6.13~9 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8dbddf17824861f2298de093549e6493d9844835;p=linux-2.6-omap-h63xx.git [PATCH] acpi_shutdown: Only prepare for power off on power_off When acpi_sleep_prepare was moved into a shutdown method we started calling it for all shutdowns. It appears this triggers some systems to power off on reboot. Avoid this by only calling acpi_sleep_prepare if we are going to power off the system. Signed-off-by: Eric W. Biederman Signed-off-by: Linus Torvalds --- diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c index 186b182c582..f93d2ee5480 100644 --- a/drivers/acpi/sleep/poweroff.c +++ b/drivers/acpi/sleep/poweroff.c @@ -55,7 +55,11 @@ void acpi_power_off(void) static int acpi_shutdown(struct sys_device *x) { - return acpi_sleep_prepare(ACPI_STATE_S5); + if (system_state == SYSTEM_POWER_OFF) { + /* Prepare if we are going to power off the system */ + return acpi_sleep_prepare(ACPI_STATE_S5); + } + return 0; } static struct sysdev_class acpi_sysclass = {