[PATCH 5/7] power: supply: core: remove of_node from power_supply_config

Sebastian Reichel
2025-02-24T23:22:02Z

All drivers have been migrated from .of_node to .fwnode,
so let's kill the former.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
drivers/power/supply/power_supply_core.c | 3 +--
include/linux/power_supply.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 11030035da6f121ca76bebf800c06cfd5db57578..c43539ea1318506ada0a6fcbcdbf7ece253f5257 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -1542,10 +1542,9 @@ __power_supply_register(struct device *parent,
dev_set_drvdata(dev, psy);
psy->desc = desc;
if (cfg) {
+ device_set_node(dev, cfg->fwnode);
dev->groups = cfg->attr_grp;
psy->drv_data = cfg->drv_data;
- dev->of_node =
- cfg->fwnode ? to_of_node(cfg->fwnode) : cfg->of_node;
psy->supplied_to = cfg->supplied_to;
psy->num_supplicants = cfg->num_supplicants;
}
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 975ccab56597ef579ef0c9dc913dcb0a26b5855a..a785742f97721e7e70d0e4c17a1ded7b985acb6d 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -229,7 +229,6 @@ struct power_supply;

/* Run-time specific power supply configuration */
struct power_supply_config {
- struct device_node *of_node;
struct fwnode_handle *fwnode;

/* Driver private data */

--
2.47.2