aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2005-08-27 02:56:18 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-27 13:11:40 -0400
commit8dbddf17824861f2298de093549e6493d9844835 (patch)
tree26d82a3ea3f1b7be05468ae7e811775851a06731 /drivers/acpi
parent6a029a90f5b93e2b50bcbbaef05ef91fa0c1d6b3 (diff)
[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 <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/sleep/poweroff.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c
index 186b182c5825..f93d2ee54800 100644
--- a/drivers/acpi/sleep/poweroff.c
+++ b/drivers/acpi/sleep/poweroff.c
@@ -55,7 +55,11 @@ void acpi_power_off(void)
55 55
56static int acpi_shutdown(struct sys_device *x) 56static int acpi_shutdown(struct sys_device *x)
57{ 57{
58 return acpi_sleep_prepare(ACPI_STATE_S5); 58 if (system_state == SYSTEM_POWER_OFF) {
59 /* Prepare if we are going to power off the system */
60 return acpi_sleep_prepare(ACPI_STATE_S5);
61 }
62 return 0;
59} 63}
60 64
61static struct sysdev_class acpi_sysclass = { 65static struct sysdev_class acpi_sysclass = {