diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-12-14 13:35:08 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-01-10 15:43:46 +0100 |
commit | e70b9d7a74698f1374244b2251216428db920aed (patch) | |
tree | b8091531241075d04501751b5236ab54afbe48c2 /drivers/bus | |
parent | 12763d0fe56899d3729d0e6755446ed7c740a88a (diff) | |
download | barebox-e70b9d7a74698f1374244b2251216428db920aed.tar.gz |
Rename device_d::device_node to device_d::of_node
Linux struct device has the member of_node for the device_node pointer.
Rename this in barebox accordingly to minimize the necessary changes
when porting Linux code. This was done with the semantic patch:
@@ struct device_d E; @@
- E.device_node
+ E.of_node
@@ struct device_d *E; @@
- E->device_node
+ E->of_node
Plus some manual adjustments.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/imx-weim.c | 6 | ||||
-rw-r--r-- | drivers/bus/omap-gpmc.c | 4 | ||||
-rw-r--r-- | drivers/bus/ti-sysc.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 01a35cfc9f..7d8471b7ac 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -106,7 +106,7 @@ static int weim_parse_dt(struct imx_weim *weim) struct device_node *child; int ret; - for_each_child_of_node(weim->dev->device_node, child) { + for_each_child_of_node(weim->dev->of_node, child) { if (!child->name) continue; @@ -118,10 +118,10 @@ static int weim_parse_dt(struct imx_weim *weim) } } - ret = of_platform_populate(weim->dev->device_node, NULL, weim->dev); + ret = of_platform_populate(weim->dev->of_node, NULL, weim->dev); if (ret) dev_err(weim->dev, "%s fail to create devices.\n", - weim->dev->device_node->full_name); + weim->dev->of_node->full_name); return ret; } diff --git a/drivers/bus/omap-gpmc.c b/drivers/bus/omap-gpmc.c index 5f65d59911..2d3a637820 100644 --- a/drivers/bus/omap-gpmc.c +++ b/drivers/bus/omap-gpmc.c @@ -523,7 +523,7 @@ static int gpmc_probe_nand_child(struct device_d *dev, dev = device_alloc("gpmc_nand", DEVICE_ID_DYNAMIC); device_add_resource(dev, NULL, (resource_size_t)gpmc_base, SZ_4K, IORESOURCE_MEM); device_add_data(dev, &gpmc_nand_data, sizeof(gpmc_nand_data)); - dev->device_node = child; + dev->of_node = child; platform_device_register(dev); return 0; @@ -602,7 +602,7 @@ err: static int gpmc_probe(struct device_d *dev) { - struct device_node *child, *node = dev->device_node; + struct device_node *child, *node = dev->of_node; int ret; gpmc_generic_init(0x12); diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index ff9d2f81cd..e863e01f3b 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -12,11 +12,11 @@ static int ti_sysc_probe(struct device_d *dev) { int ret; - ret = of_platform_populate(dev->device_node, + ret = of_platform_populate(dev->of_node, of_default_bus_match_table, dev); if (ret) dev_err(dev, "%s fail to create devices.\n", - dev->device_node->full_name); + dev->of_node->full_name); return ret; }; |