aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/genet/bcmmii.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-01-13 00:21:27 -0500
committerDavid S. Miller <davem@davemloft.net>2016-01-13 00:21:27 -0500
commitddb5388ffd0ad75d07e7b78181a0b579824ba6f0 (patch)
treebe1e2bd103c69d7bbace3fffd97bc3d714bbc3d7 /drivers/net/ethernet/broadcom/genet/bcmmii.c
parentnet: netlink: Fix multicast group storage allocation for families with more than one groups (diff)
parentMerge tag 'pm+acpi-4.5-rc1-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (diff)
downloadlinux-dev-ddb5388ffd0ad75d07e7b78181a0b579824ba6f0.tar.xz
linux-dev-ddb5388ffd0ad75d07e7b78181a0b579824ba6f0.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Diffstat (limited to 'drivers/net/ethernet/broadcom/genet/bcmmii.c')
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmmii.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index 8bdfe53754ba..0d775964b060 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -401,9 +401,7 @@ int bcmgenet_mii_probe(struct net_device *dev)
* Ethernet MAC ISRs
*/
if (priv->internal_phy)
- priv->mii_bus->irq[phydev->addr] = PHY_IGNORE_INTERRUPT;
- else
- priv->mii_bus->irq[phydev->addr] = PHY_POLL;
+ priv->mii_bus->irq[phydev->mdio.addr] = PHY_IGNORE_INTERRUPT;
return 0;
}
@@ -477,12 +475,6 @@ static int bcmgenet_mii_alloc(struct bcmgenet_priv *priv)
snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d",
priv->pdev->name, priv->pdev->id);
- bus->irq = kcalloc(PHY_MAX_ADDR, sizeof(int), GFP_KERNEL);
- if (!bus->irq) {
- mdiobus_free(priv->mii_bus);
- return -ENOMEM;
- }
-
return 0;
}
@@ -581,7 +573,7 @@ static int bcmgenet_mii_pd_init(struct bcmgenet_priv *priv)
}
if (pd->phy_address >= 0 && pd->phy_address < PHY_MAX_ADDR)
- phydev = mdio->phy_map[pd->phy_address];
+ phydev = mdiobus_get_phy(mdio, pd->phy_address);
else
phydev = phy_find_first(mdio);
@@ -648,7 +640,6 @@ int bcmgenet_mii_init(struct net_device *dev)
out:
of_node_put(priv->phy_dn);
mdiobus_unregister(priv->mii_bus);
- kfree(priv->mii_bus->irq);
mdiobus_free(priv->mii_bus);
return ret;
}
@@ -659,6 +650,5 @@ void bcmgenet_mii_exit(struct net_device *dev)
of_node_put(priv->phy_dn);
mdiobus_unregister(priv->mii_bus);
- kfree(priv->mii_bus->irq);
mdiobus_free(priv->mii_bus);
}