]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/phy/mdio_bus.c
Merge tag 'v3.16-rc1' into i2c/for-next
[karo-tx-linux.git] / drivers / net / phy / mdio_bus.c
index 68a9a3867c0f233cff2ff93d7954dfef598e6941..2e58aa54484c9ca4e3154e231a3af2766bc84933 100644 (file)
@@ -117,7 +117,7 @@ struct mii_bus *devm_mdiobus_alloc_size(struct device *dev, int sizeof_priv)
 
        return bus;
 }
-EXPORT_SYMBOL_GPL(devm_mdiobus_alloc);
+EXPORT_SYMBOL_GPL(devm_mdiobus_alloc_size);
 
 /**
  * devm_mdiobus_free - Resource-managed mdiobus_free()
@@ -300,6 +300,12 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
        if (IS_ERR(phydev) || phydev == NULL)
                return phydev;
 
+       /*
+        * For DT, see if the auto-probed phy has a correspoding child
+        * in the bus node, and set the of_node pointer in this case.
+        */
+       of_mdiobus_link_phydev(bus, phydev);
+
        err = phy_device_register(phydev);
        if (err) {
                phy_device_free(phydev);