Skip to content

Commit 520c790

Browse files
committed
power: supply: core: remove of_node from power_supply_config
All drivers have been migrated from .of_node to .fwnode, so let's kill the former. Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/20250430-psy-core-convert-to-fwnode-v2-2-f9643b958677@collabora.com Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 0bbdb13 commit 520c790

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

drivers/power/supply/power_supply_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,10 +1529,9 @@ __power_supply_register(struct device *parent,
15291529
dev_set_drvdata(dev, psy);
15301530
psy->desc = desc;
15311531
if (cfg) {
1532+
device_set_node(dev, cfg->fwnode);
15321533
dev->groups = cfg->attr_grp;
15331534
psy->drv_data = cfg->drv_data;
1534-
dev->of_node =
1535-
cfg->fwnode ? to_of_node(cfg->fwnode) : cfg->of_node;
15361535
psy->supplied_to = cfg->supplied_to;
15371536
psy->num_supplicants = cfg->num_supplicants;
15381537
}

include/linux/power_supply.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ struct power_supply;
232232

233233
/* Run-time specific power supply configuration */
234234
struct power_supply_config {
235-
struct device_node *of_node;
236235
struct fwnode_handle *fwnode;
237236

238237
/* Driver private data */

0 commit comments

Comments
 (0)