提交 2a4fc4ea 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: lantiq_etop.c: Use helper to find first phy

Make use of the helper to find the first phy device.
This also fixes the compile breakage.
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6c672c9b
...@@ -375,15 +375,9 @@ static int ...@@ -375,15 +375,9 @@ static int
ltq_etop_mdio_probe(struct net_device *dev) ltq_etop_mdio_probe(struct net_device *dev)
{ {
struct ltq_etop_priv *priv = netdev_priv(dev); struct ltq_etop_priv *priv = netdev_priv(dev);
struct phy_device *phydev = NULL; struct phy_device *phydev;
int phy_addr;
for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) { phydev = phy_find_first(priv->mii_bus);
if (priv->mii_bus->phy_map[phy_addr]) {
phydev = priv->mii_bus->phy_map[phy_addr];
break;
}
}
if (!phydev) { if (!phydev) {
netdev_err(dev, "no PHY found\n"); netdev_err(dev, "no PHY found\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册