aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2014-01-04 19:27:17 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-04 19:27:58 -0500
commit29935aebc7a8f2d3f9cc1743f24f0db8b4610ece (patch)
treee42888d112b50d10849fbfdfb91434c165d1d322 /drivers/net/phy/phy.c
parent77051ed829bc1e8b4a99a4a27520faa5bab0976a (diff)
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);
406/** 406/**
407 * phy_start_machine - start PHY state machine tracking 407 * phy_start_machine - start PHY state machine tracking
408 * @phydev: the phy_device struct 408 * @phydev: the phy_device struct
409 * @handler: callback function for state change notifications
410 * 409 *
411 * Description: The PHY infrastructure can run a state machine 410 * Description: The PHY infrastructure can run a state machine
412 * which tracks whether the PHY is starting up, negotiating, 411 * which tracks whether the PHY is starting up, negotiating,
413 * etc. This function starts the timer which tracks the state 412 * etc. This function starts the timer which tracks the state
414 * of the PHY. If you want to be notified when the state changes, 413 * of the PHY. If you want to maintain your own state machine,
415 * pass in the callback @handler, otherwise, pass NULL. If you 414 * do not call this function.
416 * want to maintain your own state machine, do not call this
417 * function.
418 */ 415 */
419void phy_start_machine(struct phy_device *phydev, 416void phy_start_machine(struct phy_device *phydev)
420 void (*handler)(struct net_device *))
421{ 417{
422 phydev->adjust_state = handler;
423
424 queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, HZ); 418 queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, HZ);
425} 419}
426 420
@@ -440,8 +434,6 @@ void phy_stop_machine(struct phy_device *phydev)
440 if (phydev->state > PHY_UP) 434 if (phydev->state > PHY_UP)
441 phydev->state = PHY_UP; 435 phydev->state = PHY_UP;
442 mutex_unlock(&phydev->lock); 436 mutex_unlock(&phydev->lock);
443
444 phydev->adjust_state = NULL;
445} 437}
446 438
447/** 439/**
@@ -706,9 +698,6 @@ void phy_state_machine(struct work_struct *work)
706 698
707 mutex_lock(&phydev->lock); 699 mutex_lock(&phydev->lock);
708 700
709 if (phydev->adjust_state)
710 phydev->adjust_state(phydev->attached_dev);
711
712 switch (phydev->state) { 701 switch (phydev->state) {
713 case PHY_DOWN: 702 case PHY_DOWN:
714 case PHY_STARTING: 703 case PHY_STARTING: