lkml.org 
[lkml]   [2005]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] [ACPI] acpi_shutdown: Only prepare for power off on power_off
From
Date

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 <ebiederm@xmission.com>


---

drivers/acpi/sleep/poweroff.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

7194b86c5e67aaf9ce8c25482441e87d700f057d
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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-27 09:02    [W:0.047 / U:4.064 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site