summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2014-01-05 01:27:17 +0100
committerDavid S. Miller <davem@davemloft.net>2014-01-05 01:27:58 +0100
commit29935aebc7a8f2d3f9cc1743f24f0db8b4610ece (patch)
treee42888d112b50d10849fbfdfb91434c165d1d322 /drivers/net/phy/phy.c
parentphy: kill excess empty lines (diff)
downloadlinux-29935aebc7a8f2d3f9cc1743f24f0db8b4610ece.tar.xz
linux-29935aebc7a8f2d3f9cc1743f24f0db8b4610ece.zip
phylib: remove unused adjust_state() callback
Remove adjust_state() callback from 'struct phy_device' since it seems to have never been really used from the inception: phy_start_machine() has been always called with 2nd argument equal to NULL. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4e6dcc1cc237..19da5ab615bd 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -406,21 +406,15 @@ EXPORT_SYMBOL(phy_start_aneg);
/**
* phy_start_machine - start PHY state machine tracking
* @phydev: the phy_device struct
- * @handler: callback function for state change notifications
*
* Description: The PHY infrastructure can run a state machine
* which tracks whether the PHY is starting up, negotiating,
* etc. This function starts the timer which tracks the state
- * of the PHY. If you want to be notified when the state changes,
- * pass in the callback @handler, otherwise, pass NULL. If you
- * want to maintain your own state machine, do not call this
- * function.
+ * of the PHY. If you want to maintain your own state machine,
+ * do not call this function.
*/
-void phy_start_machine(struct phy_device *phydev,
- void (*handler)(struct net_device *))
+void phy_start_machine(struct phy_device *phydev)
{
- phydev->adjust_state = handler;
-
queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, HZ);
}
@@ -440,8 +434,6 @@ void phy_stop_machine(struct phy_device *phydev)
if (phydev->state > PHY_UP)
phydev->state = PHY_UP;
mutex_unlock(&phydev->lock);
-
- phydev->adjust_state = NULL;
}
/**
@@ -706,9 +698,6 @@ void phy_state_machine(struct work_struct *work)
mutex_lock(&phydev->lock);
- if (phydev->adjust_state)
- phydev->adjust_state(phydev->attached_dev);
-
switch (phydev->state) {
case PHY_DOWN:
case PHY_STARTING: