diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 19:01:43 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-08-29 19:01:43 -0400 |
commit | da61396d24e37258817e42537c482e962b4742f7 (patch) | |
tree | 4293a5d557b8f9fed8a2bac93f1e5c939c7b65c3 /drivers/acpi/sleep/poweroff.c | |
parent | 2f058256cb64e346f4fb4499ff4e0f1c2791a4b4 (diff) | |
parent | 8f3d17fb7bcb7c255197d11469fb5e9695c9d2f4 (diff) |
Merge upstream kernel into libata 'passthru' branch
Diffstat (limited to 'drivers/acpi/sleep/poweroff.c')
-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 186b182c582..f93d2ee5480 100644 --- 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 = { |