diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-01-09 18:59:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-10 19:35:00 -0500 |
commit | d1b86507d87c94a201a9a1bb31d2285b189d8e26 (patch) | |
tree | ae490994b6beeb4b8466a0f2bfa8007144ce7271 /drivers | |
parent | 391420f7b829e73b26a543e39c40a83f7de6467c (diff) |
lantiq_etop: use an unique MDIO bus name.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/lantiq_etop.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 0b3567ab8121..85e2c6cd9708 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c | |||
@@ -98,6 +98,7 @@ struct ltq_etop_chan { | |||
98 | 98 | ||
99 | struct ltq_etop_priv { | 99 | struct ltq_etop_priv { |
100 | struct net_device *netdev; | 100 | struct net_device *netdev; |
101 | struct platform_device *pdev; | ||
101 | struct ltq_eth_data *pldata; | 102 | struct ltq_eth_data *pldata; |
102 | struct resource *res; | 103 | struct resource *res; |
103 | 104 | ||
@@ -436,7 +437,8 @@ ltq_etop_mdio_init(struct net_device *dev) | |||
436 | priv->mii_bus->read = ltq_etop_mdio_rd; | 437 | priv->mii_bus->read = ltq_etop_mdio_rd; |
437 | priv->mii_bus->write = ltq_etop_mdio_wr; | 438 | priv->mii_bus->write = ltq_etop_mdio_wr; |
438 | priv->mii_bus->name = "ltq_mii"; | 439 | priv->mii_bus->name = "ltq_mii"; |
439 | snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%x", 0); | 440 | snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x", |
441 | priv->pdev->name, priv->pdev->id); | ||
440 | priv->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); | 442 | priv->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); |
441 | if (!priv->mii_bus->irq) { | 443 | if (!priv->mii_bus->irq) { |
442 | err = -ENOMEM; | 444 | err = -ENOMEM; |
@@ -734,6 +736,7 @@ ltq_etop_probe(struct platform_device *pdev) | |||
734 | dev->ethtool_ops = <q_etop_ethtool_ops; | 736 | dev->ethtool_ops = <q_etop_ethtool_ops; |
735 | priv = netdev_priv(dev); | 737 | priv = netdev_priv(dev); |
736 | priv->res = res; | 738 | priv->res = res; |
739 | priv->pdev = pdev; | ||
737 | priv->pldata = dev_get_platdata(&pdev->dev); | 740 | priv->pldata = dev_get_platdata(&pdev->dev); |
738 | priv->netdev = dev; | 741 | priv->netdev = dev; |
739 | spin_lock_init(&priv->lock); | 742 | spin_lock_init(&priv->lock); |