Commit c45d7150 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: merge phy_start_aneg and phy_start_aneg_priv

After commit 9f2959b6 ("net: phy: improve handling delayed work")
the sync parameter isn't needed any longer in phy_start_aneg_priv().
This allows to merge phy_start_aneg() and phy_start_aneg_priv().
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00547955
...@@ -482,16 +482,15 @@ static int phy_config_aneg(struct phy_device *phydev) ...@@ -482,16 +482,15 @@ static int phy_config_aneg(struct phy_device *phydev)
} }
/** /**
* phy_start_aneg_priv - start auto-negotiation for this PHY device * phy_start_aneg - start auto-negotiation for this PHY device
* @phydev: the phy_device struct * @phydev: the phy_device struct
* @sync: indicate whether we should wait for the workqueue cancelation
* *
* Description: Sanitizes the settings (if we're not autonegotiating * Description: Sanitizes the settings (if we're not autonegotiating
* them), and then calls the driver's config_aneg function. * them), and then calls the driver's config_aneg function.
* If the PHYCONTROL Layer is operating, we change the state to * If the PHYCONTROL Layer is operating, we change the state to
* reflect the beginning of Auto-negotiation or forcing. * reflect the beginning of Auto-negotiation or forcing.
*/ */
static int phy_start_aneg_priv(struct phy_device *phydev, bool sync) int phy_start_aneg(struct phy_device *phydev)
{ {
bool trigger = 0; bool trigger = 0;
int err; int err;
...@@ -541,20 +540,6 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync) ...@@ -541,20 +540,6 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)
return err; return err;
} }
/**
* phy_start_aneg - start auto-negotiation for this PHY device
* @phydev: the phy_device struct
*
* Description: Sanitizes the settings (if we're not autonegotiating
* them), and then calls the driver's config_aneg function.
* If the PHYCONTROL Layer is operating, we change the state to
* reflect the beginning of Auto-negotiation or forcing.
*/
int phy_start_aneg(struct phy_device *phydev)
{
return phy_start_aneg_priv(phydev, true);
}
EXPORT_SYMBOL(phy_start_aneg); EXPORT_SYMBOL(phy_start_aneg);
static int phy_poll_aneg_done(struct phy_device *phydev) static int phy_poll_aneg_done(struct phy_device *phydev)
...@@ -1085,7 +1070,7 @@ void phy_state_machine(struct work_struct *work) ...@@ -1085,7 +1070,7 @@ void phy_state_machine(struct work_struct *work)
mutex_unlock(&phydev->lock); mutex_unlock(&phydev->lock);
if (needs_aneg) if (needs_aneg)
err = phy_start_aneg_priv(phydev, false); err = phy_start_aneg(phydev);
else if (do_suspend) else if (do_suspend)
phy_suspend(phydev); phy_suspend(phydev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment