提交 053842a8 编写于 作者: S Sudip Mukherjee 提交者: David S. Miller

phy: fix blackfin build failure

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: 7f854420 ("phy: Add API for {un}registering an mdio device to a bus.")
Cc: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Acked-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 89e7a154
......@@ -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... */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册