power: supply: max17042_battery: Fix current_{avg,now} hiding with no current sense
authorSebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Wed, 25 Nov 2020 04:44:44 +0000 (05:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:53:25 +0000 (11:53 +0100)
commite6207f098896401cd88e4b0130d82fe81c1fe52f
treee6016b0a51db3e25c9a318135eb64ca8cb6d9b8e
parentd73be8a24bb273db3fabf0aea0fbb874f4af70fd
power: supply: max17042_battery: Fix current_{avg,now} hiding with no current sense

[ Upstream commit 4b0a56e692503692da6555337a697c17feabbb3e ]

When current sense is disabled, max17042_no_current_sense_psy_desc gets
used which ignores two last properties from the list.

Fixes: 21b01cc879cc ("power: supply: max17042_battery: Add support for the TTE_NOW prop")
Reported-by: Timon Baetz <timon.baetz@protonmail.com>
Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/max17042_battery.c