power: supply: sbs-battery: use correct flags field
PATCH 1/1 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 function but always falling back to the general one.
--- drivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/sbs-battery.c +1 -1
@@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy,switch (psp) {case POWER_SUPPLY_PROP_PRESENT :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, psp, val);else
Signature · 1 line
2.20.1
Quoted 4 lines · Michael Nosthoff
the type flag is stored in the
chip->flagsfield not in theclient->flagsfield. This currently leads to never using the ti specific function but always falling back to the general one.
Whoops! Sorry about that. Probably could add:
MANUFACTURER_DATA formats")
and probably:
Also:
Quoted 4 lines · Brian Norris
Quoted 3 lines · Michael Nosthoff
the type flag is stored in the
chip->flagsfield not in theclient->flagsfield. This currently leads to never using the ti specific function but always falling back to the general one.
Also, the key point to why it will "never be used" is that the client (struct i2c_client) doesn't have a flag for BIT(0). See I2C_CLIENT_* flags, which start from 0x04.
Brian