[PATCH 1/2] phy: fix blackfin build failure

From: Sudip Mukherjee
Date: Fri Jan 08 2016 - 06:28:31 EST


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@xxxxxxx>
Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---

build log of next-20160108 is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/101006125

drivers/net/ethernet/adi/bfin_mac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index 6286274..6f3432a 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -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... */
--
1.9.1