mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
power: android-battery: push uevent whenever charge source changes
Ensure userspace reads an up-to-date value for charging status whenever the charge source is updated. Avoid races where stale charging state may be reflected in userspace until the next battery state poll. Change-Id: Ia744db48584e9e9abf442710c279af9e3a25c079 Signed-off-by: Todd Poynor <toddpoynor@google.com>
This commit is contained in:
parent
fd08bc44aa
commit
2d54003046
|
|
@ -399,6 +399,7 @@ static void android_bat_charger_work(struct work_struct *work)
|
|||
|
||||
mutex_unlock(&android_bat_state_lock);
|
||||
wake_lock_timeout(&battery->charger_wake_lock, HZ * 2);
|
||||
power_supply_changed(&battery->psy_bat);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user