net: phy: use genphy_c45_aneg_done in genphy_aneg_done
Now that we have it let's use genphy_c45_aneg_done() in phy_aneg_done(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6bfc1128d5
commit
d7bed825ba
|
@ -144,14 +144,10 @@ int phy_aneg_done(struct phy_device *phydev)
|
|||
{
|
||||
if (phydev->drv && phydev->drv->aneg_done)
|
||||
return phydev->drv->aneg_done(phydev);
|
||||
|
||||
/* Avoid genphy_aneg_done() if the Clause 45 PHY does not
|
||||
* implement Clause 22 registers
|
||||
*/
|
||||
if (phydev->is_c45 && !(phydev->c45_ids.devices_in_package & BIT(0)))
|
||||
return -EINVAL;
|
||||
|
||||
return genphy_aneg_done(phydev);
|
||||
else if (phydev->is_c45)
|
||||
return genphy_c45_aneg_done(phydev);
|
||||
else
|
||||
return genphy_aneg_done(phydev);
|
||||
}
|
||||
EXPORT_SYMBOL(phy_aneg_done);
|
||||
|
||||
|
|
Loading…
Reference in New Issue