lkml.org 
[lkml]   [2016]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH -next 2/2] net: bfin_mac: Fix build error due to missed API change
Date
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 --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... */
--
2.1.4
\
 
 \ /
  Last update: 2016-01-09 18:21    [W:0.143 / U:1.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site