diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2021-06-17 14:29:05 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-17 21:06:52 +0200 |
commit | 7e33d84db1a8a6c3000e9b02c074c17819680755 (patch) | |
tree | 2a88d859ace28417f566ffaa2b864c7da4e2100e /drivers/net/mdio/fwnode_mdio.c | |
parent | driver core: add a helper to setup both the of_node and fwnode of a device (diff) | |
download | linux-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.c | 3 |
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 |