提交 8dbddf17 编写于 作者: E Eric W. Biederman 提交者: Linus Torvalds

[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: NEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 6a029a90
......@@ -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 = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册