summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2021-06-17 15:29:05 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-17 12:06:52 -0700
commit7e33d84db1a8a6c3000e9b02c074c17819680755 (patch)
tree2a88d859ace28417f566ffaa2b864c7da4e2100e /drivers/net/phy
parent43e76d463c09a0272b84775bcc727c1eb8b384b2 (diff)
downloadlinux-7e33d84db1a8a6c3000e9b02c074c17819680755.tar.bz2
net: mdio: use device_set_node() to setup both fwnode and of
Use the newly introduced helper to setup both the of_node and the fwnode for a given device. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/mdio_bus.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 24665670a89a..53f034fc2ef7 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -459,8 +459,7 @@ static void of_mdiobus_link_mdiodev(struct mii_bus *bus,
continue;
if (addr == mdiodev->addr) {
- dev->of_node = child;
- dev->fwnode = of_fwnode_handle(child);
+ device_set_node(dev, of_fwnode_handle(child));
return;
}
}