From: ebiederm@xmission.com (Eric W. Biederman)
To: Linus Torvalds <torvalds@osdl.org>
Cc: Meelis Roos <mroos@linux.ee>,
Linux Kernel list <linux-kernel@vger.kernel.org>,
Masoud Sharbiani <masouds@masoud.ir>,
Len Brown <len.brown@intel.com>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] [ACPI] acpi_shutdown: Only prepare for power off on power_off
Date: Sat, 27 Aug 2005 00:56:18 -0600 [thread overview]
Message-ID: <m1r7cfswa5.fsf_-_@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <Pine.SOC.4.61.0508262144490.24024@math.ut.ee> (Meelis Roos's message of "Fri, 26 Aug 2005 21:45:10 +0300 (EEST)")
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 = {
next prev parent reply other threads:[~2005-08-27 6:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-20 18:41 2.6.13-rc6: halt instead of reboot Meelis Roos
2005-08-22 5:00 ` Eric W. Biederman
2005-08-22 8:53 ` Meelis Roos
2005-08-22 9:34 ` Eric W. Biederman
2005-08-24 19:55 ` Meelis Roos
2005-08-25 3:32 ` Eric W. Biederman
2005-08-25 21:49 ` Meelis Roos
2005-08-26 5:05 ` Meelis Roos
2005-08-26 5:52 ` Eric W. Biederman
2005-08-26 18:45 ` Meelis Roos
2005-08-27 6:56 ` Eric W. Biederman [this message]
2005-08-27 11:58 ` [PATCH] [ACPI] acpi_shutdown: Only prepare for power off on power_off Pavel Machek
2005-08-27 19:48 ` Eric W. Biederman
2005-08-27 20:48 ` Pavel Machek
2005-08-22 15:52 ` 2.6.13-rc6: halt instead of reboot Masoud Sharbiani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1r7cfswa5.fsf_-_@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masouds@masoud.ir \
--cc=mroos@linux.ee \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome