diff options
author | iwasaki <iwasaki@FreeBSD.org> | 2001-11-30 16:06:00 +0000 |
---|---|---|
committer | iwasaki <iwasaki@FreeBSD.org> | 2001-11-30 16:06:00 +0000 |
commit | 77d826cd4189233ea9473a4f1e3007034dea6531 (patch) | |
tree | d847b1420201326012a3049af60c55992ea4233c /sys | |
parent | 523aaa204d8d8b354fa65053436e740ece6517a8 (diff) | |
download | FreeBSD-src-77d826cd4189233ea9473a4f1e3007034dea6531.zip FreeBSD-src-77d826cd4189233ea9473a4f1e3007034dea6531.tar.gz |
Add a couple of minor changes.
- set sc->acpi_s4bios to 1 by default for hibernation until
OS-initiated S4 transition is implemented.
- change the behavior of acpi_sleep_state_sysctl() if new value is
the same as old one, do nothing instead of EINVAL.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpica/acpi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index cc8b86f..8aba3cc 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -414,6 +414,7 @@ acpi_attach(device_t dev) SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW, &sc->acpi_verbose, 0, "verbose mode"); + sc->acpi_s4bios = 1; if (bootverbose) sc->acpi_verbose = 1; @@ -1758,8 +1759,10 @@ acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) sizeof(sleep_state)) == 0) break; } - if ((new_state != old_state) && (new_state <= ACPI_S_STATES_MAX+1)) { - *(u_int *)oidp->oid_arg1 = new_state; + if (new_state <= ACPI_S_STATES_MAX+1) { + if (new_state != old_state) { + *(u_int *)oidp->oid_arg1 = new_state; + } } else { error = EINVAL; } |