1 --- a/drivers/net/ethernet/lantiq_etop.c
2 +++ b/drivers/net/ethernet/lantiq_etop.c
4 #include <linux/of_net.h>
5 #include <linux/of_irq.h>
6 #include <linux/of_platform.h>
7 +#include <linux/of_mdio.h>
9 #include <asm/checksum.h>
11 @@ -553,7 +554,8 @@ static int
12 ltq_etop_mdio_init(struct net_device *dev)
14 struct ltq_etop_priv *priv = netdev_priv(dev);
16 + struct device_node *mdio_np = NULL;
19 priv->mii_bus = mdiobus_alloc();
21 @@ -573,7 +575,15 @@ ltq_etop_mdio_init(struct net_device *de
22 priv->mii_bus->name = "ltq_mii";
23 snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
24 priv->pdev->name, priv->pdev->id);
25 - if (mdiobus_register(priv->mii_bus)) {
27 + mdio_np = of_get_child_by_name(priv->pdev->dev.of_node, "mdio-bus");
30 + ret = of_mdiobus_register(priv->mii_bus, mdio_np);
32 + ret = mdiobus_register(priv->mii_bus);
36 goto err_out_free_mdiobus;