summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 22:34:41 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 11:44:40 -0700
commite998092f7b7c2ce3199db91177aa43397a3f76d7 (patch)
tree5fbf77c8816f282dfbf106f18fb2c02d6ebd602c /drivers/net/ethernet
parent18df06c2cafea69b19ab5f274865b89c3ab0f715 (diff)
downloadtalos-op-linux-e998092f7b7c2ce3199db91177aa43397a3f76d7.tar.gz
talos-op-linux-e998092f7b7c2ce3199db91177aa43397a3f76d7.zip
drivers: net: spider_net: use setup_timer() helper.
Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais <allen.lkml@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/toshiba/spider_net.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c
index cec9e70ab995..a913538d3213 100644
--- a/drivers/net/ethernet/toshiba/spider_net.c
+++ b/drivers/net/ethernet/toshiba/spider_net.c
@@ -2256,16 +2256,14 @@ spider_net_setup_netdev(struct spider_net_card *card)
pci_set_drvdata(card->pdev, netdev);
- init_timer(&card->tx_timer);
- card->tx_timer.function =
- (void (*)(unsigned long)) spider_net_cleanup_tx_ring;
- card->tx_timer.data = (unsigned long) card;
+ setup_timer(&card->tx_timer,
+ (void(*)(unsigned long))spider_net_cleanup_tx_ring,
+ (unsigned long)card);
netdev->irq = card->pdev->irq;
card->aneg_count = 0;
- init_timer(&card->aneg_timer);
- card->aneg_timer.function = spider_net_link_phy;
- card->aneg_timer.data = (unsigned long) card;
+ setup_timer(&card->aneg_timer, spider_net_link_phy,
+ (unsigned long)card);
netif_napi_add(netdev, &card->napi,
spider_net_poll, SPIDER_NET_NAPI_WEIGHT);
OpenPOWER on IntegriCloud