Commit d1b86507 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

lantiq_etop: use an unique MDIO bus name.

Signed-off-by: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 391420f7
...@@ -98,6 +98,7 @@ struct ltq_etop_chan { ...@@ -98,6 +98,7 @@ struct ltq_etop_chan {
struct ltq_etop_priv { struct ltq_etop_priv {
struct net_device *netdev; struct net_device *netdev;
struct platform_device *pdev;
struct ltq_eth_data *pldata; struct ltq_eth_data *pldata;
struct resource *res; struct resource *res;
...@@ -436,7 +437,8 @@ ltq_etop_mdio_init(struct net_device *dev) ...@@ -436,7 +437,8 @@ ltq_etop_mdio_init(struct net_device *dev)
priv->mii_bus->read = ltq_etop_mdio_rd; priv->mii_bus->read = ltq_etop_mdio_rd;
priv->mii_bus->write = ltq_etop_mdio_wr; priv->mii_bus->write = ltq_etop_mdio_wr;
priv->mii_bus->name = "ltq_mii"; priv->mii_bus->name = "ltq_mii";
snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%x", 0); snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
priv->pdev->name, priv->pdev->id);
priv->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); priv->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
if (!priv->mii_bus->irq) { if (!priv->mii_bus->irq) {
err = -ENOMEM; err = -ENOMEM;
...@@ -734,6 +736,7 @@ ltq_etop_probe(struct platform_device *pdev) ...@@ -734,6 +736,7 @@ ltq_etop_probe(struct platform_device *pdev)
dev->ethtool_ops = &ltq_etop_ethtool_ops; dev->ethtool_ops = &ltq_etop_ethtool_ops;
priv = netdev_priv(dev); priv = netdev_priv(dev);
priv->res = res; priv->res = res;
priv->pdev = pdev;
priv->pldata = dev_get_platdata(&pdev->dev); priv->pldata = dev_get_platdata(&pdev->dev);
priv->netdev = dev; priv->netdev = dev;
spin_lock_init(&priv->lock); spin_lock_init(&priv->lock);
......
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