summaryrefslogtreecommitdiffstats
path: root/drivers/net/macb.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-12-14 13:35:08 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2023-01-10 15:43:46 +0100
commite70b9d7a74698f1374244b2251216428db920aed (patch)
treeb8091531241075d04501751b5236ab54afbe48c2 /drivers/net/macb.c
parent12763d0fe56899d3729d0e6755446ed7c740a88a (diff)
downloadbarebox-e70b9d7a74698f1374244b2251216428db920aed.tar.gz
barebox-e70b9d7a74698f1374244b2251216428db920aed.tar.xz
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/net/macb.c')
-rw-r--r--drivers/net/macb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 5dbca1553e..7ccc112c0c 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -815,19 +815,19 @@ static int macb_probe(struct device_d *dev)
macb->phy_flags = pdata->phy_flags;
pclk_name = "macb_clk";
hclk_name = NULL;
- } else if (IS_ENABLED(CONFIG_OFDEVICE) && dev->device_node) {
+ } else if (IS_ENABLED(CONFIG_OFDEVICE) && dev->of_node) {
int ret;
struct device_node *mdiobus;
- ret = of_get_phy_mode(dev->device_node);
+ ret = of_get_phy_mode(dev->of_node);
if (ret < 0)
macb->interface = PHY_INTERFACE_MODE_MII;
else
macb->interface = ret;
- mdiobus = of_get_child_by_name(dev->device_node, "mdio");
+ mdiobus = of_get_child_by_name(dev->of_node, "mdio");
if (mdiobus)
- macb->miibus.dev.device_node = mdiobus;
+ macb->miibus.dev.of_node = mdiobus;
macb->phy_addr = -1;
pclk_name = "pclk";