mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-23 00:33:21 +00:00
Record the new status after checking if it has changed, not before. This
fixes lost AC line transition events. Bug report: Kevin Oberman
This commit is contained in:
parent
ac77164d64
commit
e1ebe17579
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=133661
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue