Re: [PATCH v3 1/2] power: supply: bq25630: Scope battery information to bq25630_setup()
Waqar Hameed <[email protected]>
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 30, 2026 at 09:17 +0800 Linmao Li <[email protected]> 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 <[email protected]> Looks good, thanks! Reviewed-by: Waqar Hameed <[email protected]> [...]