Re: [PATCH v2] power: supply: sbs-battery: use correct flags field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michael,

I think that Sebastian is expected to be cc'ed, so adding him
(otherwise he can miss your patch)

Missatge de Michael Nosthoff <committed@xxxxxxxx> del dia dv., 16
d’ag. 2019 a les 9:38:
>
> 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: 76b16f4cdfb8 ("power: supply: sbs-battery: don't assume
> MANUFACTURER_DATA formats")
>
> Signed-off-by: Michael Nosthoff <committed@xxxxxxxx>
> Reviewed-by: Brian Norris <briannorris@xxxxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>

Found this patch while looking at another issue and LGTM, so in case
this helps the patch landing

Reviewed-by: Enric Balletbo i Serra <enric.balletbo@xxxxxxxxxxxxx>

Thanks,
 Enric

> ---
> Changes since v1:
> * Changed comment according to Brian's suggestions
> * Added Fixes tag
> * Added reviewed and cc stable
>
>  drivers/power/supply/sbs-battery.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c
> index 048d205d7074..2e86cc1e0e35 100644
> --- a/drivers/power/supply/sbs-battery.c
> +++ b/drivers/power/supply/sbs-battery.c
> @@ -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
> --
> 2.20.1
>




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux