aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r--drivers/net/phy/phy_device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 1a99bb24410..c0761197c07 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -460,6 +460,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
460 } 460 }
461 461
462 phydev->attached_dev = dev; 462 phydev->attached_dev = dev;
463 dev->phydev = phydev;
463 464
464 phydev->dev_flags = flags; 465 phydev->dev_flags = flags;
465 466
@@ -513,6 +514,7 @@ EXPORT_SYMBOL(phy_attach);
513 */ 514 */
514void phy_detach(struct phy_device *phydev) 515void phy_detach(struct phy_device *phydev)
515{ 516{
517 phydev->attached_dev->phydev = NULL;
516 phydev->attached_dev = NULL; 518 phydev->attached_dev = NULL;
517 519
518 /* If the device had no specific driver before (i.e. - it 520 /* If the device had no specific driver before (i.e. - it