summaryrefslogtreecommitdiffstats
path: root/drivers/net/mdio/fwnode_mdio.c
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2021-06-17 14:29:05 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-17 21:06:52 +0200
commit7e33d84db1a8a6c3000e9b02c074c17819680755 (patch)
tree2a88d859ace28417f566ffaa2b864c7da4e2100e /drivers/net/mdio/fwnode_mdio.c
parentdriver core: add a helper to setup both the of_node and fwnode of a device (diff)
downloadlinux-7e33d84db1a8a6c3000e9b02c074c17819680755.tar.xz
linux-7e33d84db1a8a6c3000e9b02c074c17819680755.zip
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/mdio/fwnode_mdio.c')
-rw-r--r--drivers/net/mdio/fwnode_mdio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/mdio/fwnode_mdio.c b/drivers/net/mdio/fwnode_mdio.c
index 283ddb1185bd..1becb1a731f6 100644
--- a/drivers/net/mdio/fwnode_mdio.c
+++ b/drivers/net/mdio/fwnode_mdio.c
@@ -65,8 +65,7 @@ int fwnode_mdiobus_phy_device_register(struct mii_bus *mdio,
* can be looked up later
*/
fwnode_handle_get(child);
- phy->mdio.dev.of_node = to_of_node(child);
- phy->mdio.dev.fwnode = child;
+ device_set_node(&phy->mdio.dev, child);
/* All data is now stored in the phy struct;
* register it