]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/phy/phy_device.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
[karo-tx-linux.git] / drivers / net / phy / phy_device.c
index 1a99bb2441064c5dae8014628bd718d033e752e6..c0761197c07e6a94e67e3d0d4f417d888e2ec68f 100644 (file)
@@ -460,6 +460,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
        }
 
        phydev->attached_dev = dev;
+       dev->phydev = phydev;
 
        phydev->dev_flags = flags;
 
@@ -513,6 +514,7 @@ EXPORT_SYMBOL(phy_attach);
  */
 void phy_detach(struct phy_device *phydev)
 {
+       phydev->attached_dev->phydev = NULL;
        phydev->attached_dev = NULL;
 
        /* If the device had no specific driver before (i.e. - it