drivers: net: zynq_gem: fix phy dt node setting
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 5 Jul 2018 17:02:52 +0000 (12:02 -0500)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 26 Jul 2018 19:08:23 +0000 (14:08 -0500)
Now zynq_gem driver will overwrite UCLASS_ETH node when PHY is
connected and configured which is not correct.
Use struct phydev->node instead.

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>
drivers/net/zynq_gem.c

index d1138fe0903df9745811917d38526b04c96c4bb3..0f56cda16899b5c7754da172e7afa2757cf24c7c 100644 (file)
@@ -350,7 +350,7 @@ static int zynq_phy_init(struct udevice *dev)
        priv->phydev->advertising = priv->phydev->supported;
 
        if (priv->phy_of_handle > 0)
-               dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
+               priv->phydev->node = offset_to_ofnode(priv->phy_of_handle);
 
        return phy_config(priv->phydev);
 }