]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
power: bq24190: Fix ignored supplicants
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 5 Jan 2015 08:51:48 +0000 (09:51 +0100)
committerJiri Slaby <jslaby@suse.cz>
Sun, 1 Mar 2015 22:34:16 +0000 (23:34 +0100)
commit20f1c8780877115f2292d56ad209d1f17c611386
treed2d0125bac3877b602e98864ee5ee137a3ca3147
parentaf3de02edc2dd1f2cf959a98863e02bee8398373
power: bq24190: Fix ignored supplicants

commit 478913fdbdfd4a781d91c993eb86838620fe7421 upstream.

The driver mismatched 'num_supplicants' with 'num_supplies' of
power_supply structure.

It provided list of supplicants (power_supply.supplied_to) but did
not set the number of supplicants. Instead it set the num_supplies which
is used when iterating over number of supplies (power_supply.supplied_from).

As a result the list of supplicants was ignored by core because its size
was 0.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Fixes: d7bf353fd0aa ("bq24190_charger: Add support for TI BQ24190 Battery Charger")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/power/bq24190_charger.c