summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/faraday
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-01-06 20:11:18 +0100
committerDavid S. Miller <davem@davemloft.net>2016-01-07 14:31:26 -0500
commit7f854420fbfe9d49afe2ffb1df052cfe8e215541 (patch)
tree1f3c8d932976b597cdb6db3e53b06b4a95c5d303 /drivers/net/ethernet/faraday
parent801a8ef54e8b21eb6699aaa88681259dafb1d1b5 (diff)
downloadlinux-7f854420fbfe9d49afe2ffb1df052cfe8e215541.tar.gz
linux-7f854420fbfe9d49afe2ffb1df052cfe8e215541.tar.xz
phy: Add API for {un}registering an mdio device to a bus.
Rather than have drivers directly manipulate the mii_bus structure, provide and API for registering and unregistering devices on an MDIO bus, and performing lookups. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/faraday')
-rw-r--r--drivers/net/ethernet/faraday/ftgmac100.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 8f3f2cf0dcbf..bb116ad646f6 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -839,7 +839,7 @@ static int ftgmac100_mii_probe(struct ftgmac100 *priv)
/* search for connect PHY device */
for (i = 0; i < PHY_MAX_ADDR; i++) {
- struct phy_device *tmp = priv->mii_bus->phy_map[i];
+ struct phy_device *tmp = mdiobus_get_phy(priv->mii_bus, i);
if (tmp) {
phydev = tmp;