power: supply: bq24190_charger: Call power_supply_changed() for relevant component
authorLiam Breck <liam@networkimprov.net>
Wed, 18 Jan 2017 17:26:52 +0000 (09:26 -0800)
committerSebastian Reichel <sre@kernel.org>
Fri, 20 Jan 2017 11:43:03 +0000 (12:43 +0100)
commit2d9fee6a42ea170e4378b3363a7ad385d0e67281
treef37ad18c052bd9c4fbb76d1a37794c97bd49e1f5
parentd62acc5ef0621463446091ebd7a345e06e9ab80c
power: supply: bq24190_charger: Call power_supply_changed() for relevant component

We wrongly get uevents for bq24190-charger and bq24190-battery on every
register change.

Fix by checking the association with charger and battery before
emitting uevent(s).

Fixes: d7bf353fd0aa3 ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Liam Breck <kernel@networkimprov.net>
Acked-by: Mark Greer <mgreer@animalcreek.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/bq24190_charger.c