diff options
author | njl <njl@FreeBSD.org> | 2004-08-13 17:47:40 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-08-13 17:47:40 +0000 |
commit | 7d472ce18d56078b0948b5dcdac85a8d87392c65 (patch) | |
tree | 7dc3390ae296e8ed37b8d3c5ee50e2c0d32fb2d5 /sys | |
parent | bea28d4a046ace5d1e9e72c1f2e5461e520391e9 (diff) | |
download | FreeBSD-src-7d472ce18d56078b0948b5dcdac85a8d87392c65.zip FreeBSD-src-7d472ce18d56078b0948b5dcdac85a8d87392c65.tar.gz |
Record the new status after checking if it has changed, not before. This
fixes lost AC line transition events.
Bug report: Kevin Oberman
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/acpica/acpi_acad.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_acad.c b/sys/dev/acpica/acpi_acad.c index 2e73a0f..8ff6dd0 100644 --- a/sys/dev/acpica/acpi_acad.c +++ b/sys/dev/acpica/acpi_acad.c @@ -104,8 +104,8 @@ acpi_acad_get_status(void *context) /* If status is valid and has changed, notify the system. */ ACPI_SERIAL_BEGIN(acad); - sc->status = newstatus; if (newstatus != -1 && sc->status != newstatus) { + sc->status = newstatus; power_profile_set_state(newstatus ? POWER_PROFILE_PERFORMANCE : POWER_PROFILE_ECONOMY); ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev), |