Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a4fc4ea authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6c672c9b
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -375,15 +375,9 @@ static int
ltq_etop_mdio_probe(struct net_device *dev)
{
	struct ltq_etop_priv *priv = netdev_priv(dev);
	struct phy_device *phydev = NULL;
	int phy_addr;
	struct phy_device *phydev;

	for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
		if (priv->mii_bus->phy_map[phy_addr]) {
			phydev = priv->mii_bus->phy_map[phy_addr];
			break;
		}
	}
	phydev = phy_find_first(priv->mii_bus);

	if (!phydev) {
		netdev_err(dev, "no PHY found\n");