Commit a5bd6060 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by David S. Miller

sh_eth: Use the platform device as the MDIO bus parent

The MDIO bus parent is set to the network device. Beside not reflecting
the hardware topology, this prevents registering the MDIO bus before
initializing the network device. Fix it by setting the MDIO bus parent
to the platform device.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aa8d4225
...@@ -2633,7 +2633,7 @@ static int sh_mdio_init(struct net_device *ndev, int id, ...@@ -2633,7 +2633,7 @@ static int sh_mdio_init(struct net_device *ndev, int id,
/* Hook up MII support for ethtool */ /* Hook up MII support for ethtool */
mdp->mii_bus->name = "sh_mii"; mdp->mii_bus->name = "sh_mii";
mdp->mii_bus->parent = &ndev->dev; mdp->mii_bus->parent = dev;
snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
mdp->pdev->name, id); mdp->pdev->name, id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment