diff mbox series

[U-Boot,4/5] drivers: net: cpsw: fix phy dt node setting

Message ID 20180628194755.28504-5-grygorii.strashko@ti.com
State Superseded
Delegated to: Joe Hershberger
Headers show
Series net: phy: prevent uclass_eth device "node" field overwriting | expand

Commit Message

Grygorii Strashko June 28, 2018, 7:47 p.m. UTC
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 <grygorii.strashko@ti.com>
---
 drivers/net/cpsw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger July 2, 2018, 9:12 p.m. UTC | #1
On Thu, Jun 28, 2018 at 2:47 PM, Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
> 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 <grygorii.strashko@ti.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
diff mbox series

Patch

diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 9919d39..c31695e 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;