Commit 99956a9e authored by Michael Nosthoff's avatar Michael Nosthoff Committed by Sebastian Reichel

power: supply: sbs-battery: use correct flags field

the type flag is stored in the chip->flags field not in the
client->flags field. This currently leads to never using the ti
specific health function as client->flags doesn't use that bit.
So it's always falling back to the general one.

Fixes: 76b16f4c ("power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarMichael Nosthoff <committed@heine.so>
Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
Reviewed-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent fa7da744
...@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy, ...@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy,
switch (psp) { switch (psp) {
case POWER_SUPPLY_PROP_PRESENT: case POWER_SUPPLY_PROP_PRESENT:
case POWER_SUPPLY_PROP_HEALTH: case POWER_SUPPLY_PROP_HEALTH:
if (client->flags & SBS_FLAGS_TI_BQ20Z75) if (chip->flags & SBS_FLAGS_TI_BQ20Z75)
ret = sbs_get_ti_battery_presence_and_health(client, ret = sbs_get_ti_battery_presence_and_health(client,
psp, val); psp, val);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment