Skip to content

Commit

Permalink
net: phy: merge phy_start_aneg and phy_start_aneg_priv
Browse files Browse the repository at this point in the history
After commit 9f2959b ("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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Oct 16, 2018
1 parent 0054795 commit c45d715
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @sync: indicate whether we should wait for the workqueue cancelation
*
* 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.
*/
static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)
int phy_start_aneg(struct phy_device *phydev)
{
bool trigger = 0;
int err;
Expand Down Expand Up @@ -541,20 +540,6 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)

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);

static int phy_poll_aneg_done(struct phy_device *phydev)
Expand Down Expand Up @@ -1085,7 +1070,7 @@ void phy_state_machine(struct work_struct *work)
mutex_unlock(&phydev->lock);

if (needs_aneg)
err = phy_start_aneg_priv(phydev, false);
err = phy_start_aneg(phydev);
else if (do_suspend)
phy_suspend(phydev);

Expand Down

0 comments on commit c45d715

Please sign in to comment.