[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1506013525-29291-21-git-send-email-allen.lkml@gmail.com>
Date: Thu, 21 Sep 2017 22:34:41 +0530
From: Allen Pais <allen.lkml@...il.com>
To: netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, m.grzeschik@...gutronix.de,
dmitry.tarnyagin@...kless.no, wg@...ndegger.com,
mkl@...gutronix.de, mark.einon@...il.com, linux@...linux.org.uk,
pcnet32@...ntier.com, f.fainelli@...il.com,
bcm-kernel-feedback-list@...adcom.com, venza@...wnhat.org,
ajk@...nets.uni-bremen.de, jes@...ined-monkey.org,
romieu@...zoreil.com, khc@...waw.pl, simon@...kelleys.org.uk,
davem@...emloft.net, linux-can@...r.kernel.org,
adi-buildroot-devel@...ts.sourceforge.net,
Allen Pais <allen.lkml@...il.com>
Subject: [PATCH 20/64] 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@...il.com>
---
drivers/net/ethernet/toshiba/spider_net.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/toshiba/spider_net.c b/drivers/net/ethernet/toshiba/spider_net.c
index cec9e70..a913538 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);
--
2.7.4
Powered by blists - more mailing lists