diff options
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c index 12fa2e301b..e92798ceb8 100644 --- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c @@ -127,13 +127,12 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag) if (ag->mii_bus->mdio_map[phy_addr] == NULL) continue; - DBG("%s: PHY found at %s, uid=%08x\n", - dev_name(dev), - dev_name(&ag->mii_bus->mdio_map[phy_addr]->dev), - ag->mii_bus->mdio_map[phy_addr]->phy_id); + phydev = mdiobus_get_phy(ag->mii_bus, phy_addr); - if (phydev == NULL) - phydev = mdiobus_get_phy(ag->mii_bus, phy_addr); + DBG("%s: PHY found at %s, uid=%08x\n", + dev_name(dev), + dev_name(&ag->mii_bus->mdio_map[phy_addr]->dev), + (phydev) ? phydev->phy_id : 0); #endif } |