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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 May 2017 11:32:54 +0000 (13:32 +0200)
commit092a9c8ba3be6887e2422cb17d8d90bac0a1f725
treec4eb3843a719d02b36847a13324dd38d62f0a666
parent397cad3a37378fe6619578ab16db51ed879a4688
power: supply: bq24190_charger: Call power_supply_changed() for relevant component

commit 2d9fee6a42ea170e4378b3363a7ad385d0e67281 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/power/bq24190_charger.c