diff options
author | Grygorii Strashko <grygorii.strashko@ti.com> | 2018-07-05 12:02:49 -0500 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2018-07-26 14:08:22 -0500 |
commit | b8d7ec782f3b969d828831359411203adfc20dd0 (patch) | |
tree | bd4d2d77703904ddb8f25c0e9a9444bc2d5d77e1 /drivers/net/phy | |
parent | eef0b8a930d1a8799b8ebd26e67e27401df6a9f7 (diff) |
net: phy: dp83867: switch to use phy_get_ofnode()
Use PHY API phy_get_ofnode() helper to get PHY DT node.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/ti.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c index 655f46d22f..f870e6d662 100644 --- a/drivers/net/phy/ti.c +++ b/drivers/net/phy/ti.c @@ -172,8 +172,11 @@ void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, static int dp83867_of_init(struct phy_device *phydev) { struct dp83867_private *dp83867 = phydev->priv; - struct udevice *dev = phydev->dev; - ofnode node = dev_ofnode(dev); + ofnode node; + + node = phy_get_ofnode(phydev); + if (!ofnode_valid(node)) + return -EINVAL; if (ofnode_read_bool(node, "ti,max-output-impedance")) dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX; |