mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
power: supply: bq25630: Scope battery information to bq25630_setup()
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@kylinos.cn> Reviewed-by: Waqar Hameed <waqar.hameed@axis.com> Link: https://patch.msgid.link/20260730011713.3332913-2-lilinmao@kylinos.cn Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
This commit is contained in:
parent
5584ad5706
commit
9092828e18
1 changed files with 26 additions and 22 deletions
Loading…
Add table
Add a link
Reference in a new issue