tree 26d82a3ea3f1b7be05468ae7e811775851a06731 parent 6a029a90f5b93e2b50bcbbaef05ef91fa0c1d6b3 author Eric W. Biederman <[EMAIL PROTECTED]> Sat, 27 Aug 2005 12:56:18 -0600 committer Linus Torvalds <[EMAIL PROTECTED]> Sun, 28 Aug 2005 00:11:40 -0700
[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 <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> drivers/acpi/sleep/poweroff.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/sleep/poweroff.c b/drivers/acpi/sleep/poweroff.c --- 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 = { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html