Skip to content

Commit

Permalink
[PATCH] acpi_shutdown: Only prepare for power off on power_off
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Aug 27, 2005
1 parent 6a029a9 commit 8dbddf1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/acpi/sleep/poweroff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 8dbddf1

Please sign in to comment.