phy: fix blackfin build failure
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Fri, 8 Jan 2016 11:28:14 +0000 (16:58 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jan 2016 03:46:00 +0000 (22:46 -0500)
The build of blackfin defconfig is failing with the error:
error: 'struct mii_bus' has no member named 'phy_map'

A new API mdiobus_get_phy() was introduced and phy_map was removed but
it was not changed here.

Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus.")
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/adi/bfin_mac.c

index 62862744c8707e2495d0c9cb85f1154a2ed64d51..6f3432ae670324511b04a50903f37388282bebab 100644 (file)
@@ -398,7 +398,8 @@ static int mii_probe(struct net_device *dev, int phy_mode)
 
        /* search for connected PHY device */
        for (i = 0; i < PHY_MAX_ADDR; ++i) {
-               struct phy_device *const tmp_phydev = lp->mii_bus->phy_map[i];
+               struct phy_device *const tmp_phydev =
+                       mdiobus_get_phy(lp->mii_bus, i);
 
                if (!tmp_phydev)
                        continue; /* no PHY here... */