summaryrefslogtreecommitdiffstats
path: root/sys/dev/acpica/acpi_acad.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-09-30 17:07:49 +0000
committerjhb <jhb@FreeBSD.org>2009-09-30 17:07:49 +0000
commit446a52616e1e9d08decd99b911d3fb553d8fc331 (patch)
tree445e1c55b1b43c7dbcc8a8f47d728a35e78e4b4a /sys/dev/acpica/acpi_acad.c
parent18d4fd12aabbc94268ad865c5d710b27b7fc33fe (diff)
downloadFreeBSD-src-446a52616e1e9d08decd99b911d3fb553d8fc331.zip
FreeBSD-src-446a52616e1e9d08decd99b911d3fb553d8fc331.tar.gz
Do not hold the ACPI A/C adapter lock when changing the power profile.
MFC after: 2 weeks
Diffstat (limited to 'sys/dev/acpica/acpi_acad.c')
-rw-r--r--sys/dev/acpica/acpi_acad.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_acad.c b/sys/dev/acpica/acpi_acad.c
index 638c09b..8153abc 100644
--- a/sys/dev/acpica/acpi_acad.c
+++ b/sys/dev/acpica/acpi_acad.c
@@ -109,13 +109,14 @@ acpi_acad_get_status(void *context)
ACPI_SERIAL_BEGIN(acad);
if (newstatus != -1 && sc->status != newstatus) {
sc->status = newstatus;
+ ACPI_SERIAL_END(acad);
power_profile_set_state(newstatus ? POWER_PROFILE_PERFORMANCE :
POWER_PROFILE_ECONOMY);
ACPI_VPRINT(dev, acpi_device_get_parent_softc(dev),
"%s Line\n", newstatus ? "On" : "Off");
acpi_UserNotify("ACAD", h, newstatus);
- }
- ACPI_SERIAL_END(acad);
+ } else
+ ACPI_SERIAL_END(acad);
}
static void
OpenPOWER on IntegriCloud