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>
This commit is contained in:
Ioana Ciornei
2021-06-17 15:29:05 +03:00
committed by David S. Miller
parent 43e76d463c
commit 7e33d84db1
3 changed files with 6 additions and 9 deletions

View File

@@ -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