diff mbox series

[RFC,24/26] fixup! power: supply: core: Migrate to thermal_zone_device_register()

Message ID 20231221124825.149141-25-angelogioacchino.delregno@collabora.com
State New
Headers show
Series Add thermal zones names and new registration func | expand

Commit Message

AngeloGioacchino Del Regno Dec. 21, 2023, 12:48 p.m. UTC
---
 drivers/power/supply/power_supply_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index d656a2e39157..b0211ab97f9c 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -1310,7 +1310,7 @@  static int psy_register_thermal(struct power_supply *psy)
 
 	/* Register battery zone device psy reports temperature */
 	if (psy_has_property(psy->desc, POWER_SUPPLY_PROP_TEMP)) {
-		tzdp.name = psy->desc->name;
+		tzdp.type = psy->desc->name;
 		psy->tzd = thermal_zone_device_register(&tzdp);
 		if (IS_ERR(psy->tzd))
 			return PTR_ERR(psy->tzd);