Re: [PATCH v3 1/2] power: supply: bq25630: Scope battery information to bq25630_setup()

From: Waqar Hameed

Date: Thu Jul 30 2026 - 15:35:50 EST


On Thu, Jul 30, 2026 at 09:17 +0800 Linmao Li <lilinmao@xxxxxxxxxx> wrote:

> data->batinfo is only used by bq25630_setup() to program the initial
> charge limits, but power_supply_get_battery_info() allocates it on
> psy->dev, so it stays around for the lifetime of the device. Nothing
> else in the driver uses it.
>
> Get the battery information in bq25630_setup(), just before it is read,
> and release it on every path out of that function. The driver data no
> longer has to carry the pointer.
>
> Signed-off-by: Linmao Li <lilinmao@xxxxxxxxxx>

Looks good, thanks!

Reviewed-by: Waqar Hameed <waqar.hameed@xxxxxxxx>

[...]