diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2012-06-26 15:59:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-27 04:24:16 -0400 |
commit | c26502680e59af556211fc3fd3ae0f2aa5d98440 (patch) | |
tree | 59b7337139c679171329d1286296a4846f9e7749 /drivers/net/ethernet/renesas/sh_eth.c | |
parent | ebe6e21d233bdc4f6ae5f5f649d13beb4ed7a763 (diff) |
net: sh_eth: remove unnecessary function
The sh_eth_timer() called mod_timer() for itself. So, this patch
removes the function.
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/sh_eth.c')
-rw-r--r-- | drivers/net/ethernet/renesas/sh_eth.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 326cb91abdad..cf0bc316cb60 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -1339,14 +1339,6 @@ other_irq: | |||
1339 | return ret; | 1339 | return ret; |
1340 | } | 1340 | } |
1341 | 1341 | ||
1342 | static void sh_eth_timer(unsigned long data) | ||
1343 | { | ||
1344 | struct net_device *ndev = (struct net_device *)data; | ||
1345 | struct sh_eth_private *mdp = netdev_priv(ndev); | ||
1346 | |||
1347 | mod_timer(&mdp->timer, jiffies + (10 * HZ)); | ||
1348 | } | ||
1349 | |||
1350 | /* PHY state control function */ | 1342 | /* PHY state control function */ |
1351 | static void sh_eth_adjust_link(struct net_device *ndev) | 1343 | static void sh_eth_adjust_link(struct net_device *ndev) |
1352 | { | 1344 | { |
@@ -1594,11 +1586,6 @@ static int sh_eth_open(struct net_device *ndev) | |||
1594 | if (ret) | 1586 | if (ret) |
1595 | goto out_free_irq; | 1587 | goto out_free_irq; |
1596 | 1588 | ||
1597 | /* Set the timer to check for link beat. */ | ||
1598 | init_timer(&mdp->timer); | ||
1599 | mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */ | ||
1600 | setup_timer(&mdp->timer, sh_eth_timer, (unsigned long)ndev); | ||
1601 | |||
1602 | return ret; | 1589 | return ret; |
1603 | 1590 | ||
1604 | out_free_irq: | 1591 | out_free_irq: |
@@ -1623,9 +1610,6 @@ static void sh_eth_tx_timeout(struct net_device *ndev) | |||
1623 | /* tx_errors count up */ | 1610 | /* tx_errors count up */ |
1624 | ndev->stats.tx_errors++; | 1611 | ndev->stats.tx_errors++; |
1625 | 1612 | ||
1626 | /* timer off */ | ||
1627 | del_timer_sync(&mdp->timer); | ||
1628 | |||
1629 | /* Free all the skbuffs in the Rx queue. */ | 1613 | /* Free all the skbuffs in the Rx queue. */ |
1630 | for (i = 0; i < RX_RING_SIZE; i++) { | 1614 | for (i = 0; i < RX_RING_SIZE; i++) { |
1631 | rxdesc = &mdp->rx_ring[i]; | 1615 | rxdesc = &mdp->rx_ring[i]; |
@@ -1643,10 +1627,6 @@ static void sh_eth_tx_timeout(struct net_device *ndev) | |||
1643 | 1627 | ||
1644 | /* device init */ | 1628 | /* device init */ |
1645 | sh_eth_dev_init(ndev); | 1629 | sh_eth_dev_init(ndev); |
1646 | |||
1647 | /* timer on */ | ||
1648 | mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */ | ||
1649 | add_timer(&mdp->timer); | ||
1650 | } | 1630 | } |
1651 | 1631 | ||
1652 | /* Packet transmit function */ | 1632 | /* Packet transmit function */ |
@@ -1719,8 +1699,6 @@ static int sh_eth_close(struct net_device *ndev) | |||
1719 | 1699 | ||
1720 | free_irq(ndev->irq, ndev); | 1700 | free_irq(ndev->irq, ndev); |
1721 | 1701 | ||
1722 | del_timer_sync(&mdp->timer); | ||
1723 | |||
1724 | /* Free all the skbuffs in the Rx queue. */ | 1702 | /* Free all the skbuffs in the Rx queue. */ |
1725 | sh_eth_ring_free(ndev); | 1703 | sh_eth_ring_free(ndev); |
1726 | 1704 | ||