Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2012 05:18:31 +0000 (UTC)
From:      Mitsuru IWASAKI <iwasaki@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r235772 - head/sys/dev/acpica
Message-ID:  <201205220518.q4M5IVHB088525@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: iwasaki
Date: Tue May 22 05:18:30 2012
New Revision: 235772
URL: http://svn.freebsd.org/changeset/base/235772

Log:
  Ignore the power button press event for resuming rather than starting
  shutdown.
  
  MFC after:	2 days

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Tue May 22 03:01:54 2012	(r235771)
+++ head/sys/dev/acpica/acpi.c	Tue May 22 05:18:30 2012	(r235772)
@@ -2515,6 +2515,11 @@ acpi_ReqSleepState(struct acpi_softc *sc
     if (!acpi_sleep_states[state])
 	return (EOPNOTSUPP);
 
+    /* If a suspend request is already in progress, just return. */
+    if (sc->acpi_next_sstate != 0) {
+	return (0);
+    }
+
     /* Wait until sleep is enabled. */
     while (sc->acpi_sleep_disabled) {
 	AcpiOsSleep(1000);
@@ -2522,11 +2527,6 @@ acpi_ReqSleepState(struct acpi_softc *sc
 
     ACPI_LOCK(acpi);
 
-    /* If a suspend request is already in progress, just return. */
-    if (sc->acpi_next_sstate != 0) {
-    	ACPI_UNLOCK(acpi);
-	return (0);
-    }
     sc->acpi_next_sstate = state;
 
     /* S5 (soft-off) should be entered directly with no waiting. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205220518.q4M5IVHB088525>