diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/sleep/poweroff.c | 6 |
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 | ||
56 | static int acpi_shutdown(struct sys_device *x) | 56 | static 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 | ||
61 | static struct sysdev_class acpi_sysclass = { | 65 | static struct sysdev_class acpi_sysclass = { |