aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-02-12 20:47:48 -0800
committerArve Hjønnevåg <arve@android.com>2013-04-29 14:43:21 -0700
commit8d219155c9bea45c237648910257ccf2b1e5df48 (patch)
treeb3506c78343c24959d28500eac000fa6f9d212ca
parent170c8d38dee1b94838551f6113266a527b57a8cb (diff)
downloadvexpress-lsk-8d219155c9bea45c237648910257ccf2b1e5df48.tar.gz
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>
-rw-r--r--drivers/power/android_battery.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/power/android_battery.c b/drivers/power/android_battery.c
index 6e8b4054c8d..8d45ff0f367 100644
--- a/drivers/power/android_battery.c
+++ b/drivers/power/android_battery.c
@@ -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);
}