diff mbox

[-next,2/2] net: bfin_mac: Fix build error due to missed API change

Message ID 1452357427-30578-2-git-send-email-linux@roeck-us.net
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Guenter Roeck Jan. 9, 2016, 4:37 p.m. UTC
Commit 7f854420fbfe ("phy: Add API for {un}registering an mdio device to
a bus") introduces an API to access mii_bus structures, but missed to
update the bfin_mac driver. This results in the following error message

drivers/net/ethernet/adi/bfin_mac.c: In function 'mii_probe':
drivers/net/ethernet/adi/bfin_mac.c:401:52: error:
	'struct mii_bus' has no member named 'phy_map'

Fixes: 7f854420fbfe ("phy: Add API for {un}registering an mdio device to a bus")
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/net/ethernet/adi/bfin_mac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index 8c5132624510..1281cae5b70f 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... */