From: Grygorii Strashko Date: Thu, 5 Jul 2018 17:02:49 +0000 (-0500) Subject: net: phy: dp83867: switch to use phy_get_ofnode() X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=b8d7ec782f3b969d828831359411203adfc20dd0;p=u-boot.git 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 Acked-by: Joe Hershberger Tested-by: Siva Durga Prasad Paladugu --- 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;