svn commit: r235772 - head/sys/dev/acpica
Mitsuru IWASAKI
iwasaki at FreeBSD.org
Tue May 22 05:18:31 UTC 2012
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. */
More information about the svn-src-head
mailing list