[PATCH 4/5] power: supply: bq257xx: Use psy directly instead of driver data
From: Alexey Charkov
Date: Mon Sep 07 2026 - 11:08:14 EST
Improve consistency in the bq257xx_external_power_changed() function by
using the psy pointer directly instead of dereferencing the driver data.
This makes all power_supply_*() calls follow the same pattern instead of
power_supply_am_i_supplied() standing out for no reason.
Signed-off-by: Alexey Charkov <alchark@xxxxxxxxxxx>
---
drivers/power/supply/bq257xx_charger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/bq257xx_charger.c b/drivers/power/supply/bq257xx_charger.c
index 355c59f0bbfb..8a645859460b 100644
--- a/drivers/power/supply/bq257xx_charger.c
+++ b/drivers/power/supply/bq257xx_charger.c
@@ -1057,7 +1057,7 @@ static void bq257xx_external_power_changed(struct power_supply *psy)
if (ret)
return;
- pdata->supplied = power_supply_am_i_supplied(pdata->charger);
+ pdata->supplied = power_supply_am_i_supplied(psy);
if (pdata->supplied < 0)
return;
--
2.54.0