From d4bb98170006ed98d651fabefab1c0c2b6aac234 Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Thu, 5 Jul 2018 12:02:51 -0500 Subject: [PATCH] drivers: net: cpsw: fix phy dt node setting Now CPSW 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 Acked-by: Joe Hershberger --- drivers/net/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c index 9919d3919f..c31695eba9 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -999,7 +999,7 @@ static int cpsw_phy_init(struct cpsw_priv *priv, struct cpsw_slave *slave) #ifdef CONFIG_DM_ETH if (slave->data->phy_of_handle) - dev_set_of_offset(phydev->dev, slave->data->phy_of_handle); + phydev->node = offset_to_ofnode(slave->data->phy_of_handle); #endif priv->phydev = phydev; -- 2.39.5