public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominik Brodowski <linux-JhLEnvuH02M@public.gmane.org>
To: andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] ACPI 2.5.45 relies on Software Suspend for S4
Date: Sun, 3 Nov 2002 17:30:35 +0100	[thread overview]
Message-ID: <20021103173035.A2570@brodo.de> (raw)

... and so only claim S4 support when it's available (NB: software suspend
doesn't work at the moment. But will hopefully work again soon)

	Dominik

--- linux/drivers/acpi/sleep.c.original	Sun Nov  3 17:26:04 2002
+++ linux/drivers/acpi/sleep.c	Sun Nov  3 17:28:20 2002
@@ -227,7 +227,7 @@
 	acpi_status status;
 
 	/* get out if state is invalid */
-	if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5)
+	if (state < ACPI_STATE_S1 || state > ACPI_STATE_S5 || (state == ACPI_STATE_S4))
 		return AE_ERROR;
 
 	freeze_processes();		/* device_suspend needs processes to be stopped */
@@ -706,10 +706,15 @@
 		pm_power_off = acpi_power_off;
 		register_sysrq_key('o', &sysrq_acpi_poweroff_op);
 
+#ifdef CONFIG_SOFTWARE_SUSPEND
 		/* workaround: some systems don't claim S4 support, but they
                    do support S5 (power-down). That is all we need, so
 		   indicate support. */
 		sleep_states[ACPI_STATE_S4] = 1;
+#else
+		/* we rely on SOFTWARE_SUSPEND to use S4. */
+		sleep_states[ACPI_STATE_S4] = 0;
+#endif
 	}
 
 	return_VALUE(0);


-------------------------------------------------------
This SF.net email is sponsored by: ApacheCon, November 18-21 in
Las Vegas (supported by COMDEX), the only Apache event to be
fully supported by the ASF. http://www.apachecon.com

                 reply	other threads:[~2002-11-03 16:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20021103173035.A2570@brodo.de \
    --to=linux-jhlenvuh02m@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=andrew.grover-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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