Thread (7 messages) flat view 7 messages, 1 author, 19d ago
COLD19d

[PATCH 4/5] power: supply: bq257xx: Use psy directly instead of driver data

From: Alexey Charkov <hidden>
Date: 2026-09-07 15:02:01
Also in: lkml
Subsystem: power supply class/subsystem and drivers, the rest · Maintainers: Sebastian Reichel, Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help