Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8dbddf17 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds
Browse files

[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: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6a029a90
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -55,8 +55,12 @@ void acpi_power_off(void)

static int acpi_shutdown(struct sys_device *x)
{
	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 = {
	set_kset_name("acpi"),