summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2007-06-30 17:27:31 +0000
committernjl <njl@FreeBSD.org>2007-06-30 17:27:31 +0000
commit4db9e9bfd8b24b76fd8c30e12d0bc69afa75044a (patch)
tree9a18d128bdb25aba5572fc52adb73b1c16e0c5be /sys
parent257efcd24227981f054d3a9a5a88bdc78b59a91e (diff)
downloadFreeBSD-src-4db9e9bfd8b24b76fd8c30e12d0bc69afa75044a.zip
FreeBSD-src-4db9e9bfd8b24b76fd8c30e12d0bc69afa75044a.tar.gz
My previous commit introduced a spurious warning for the case where a
switch (i.e. lid) is set to have an action of NONE. This is not an invalid state, so silently return. This fixes the warning: "acpi: request to enter state S6 failed (err 22)" Approved by: re
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index da91ce9..06de497 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2727,6 +2727,10 @@ acpi_system_eventhandler_sleep(void *arg, int state)
ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, state);
+ /* Check if button action is disabled. */
+ if (state == ACPI_S_STATES_MAX + 1)
+ return;
+
/* Request that the system prepare to enter the given suspend state. */
ret = acpi_ReqSleepState((struct acpi_softc *)arg, state);
if (ret != 0)
OpenPOWER on IntegriCloud