summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 22:34:34 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-21 11:44:40 -0700
commitf40c9d5aea0fdf5454464bc477898cc981ff9715 (patch)
treeae19be183fd81df1b425084cd64f8a09e9f935c0
parente7bbad4487ae4005904d00a0a04622f07fadbc5b (diff)
downloadlinux-f40c9d5aea0fdf5454464bc477898cc981ff9715.tar.bz2
drivers: net: ns83820: 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>
-rw-r--r--drivers/net/ethernet/natsemi/ns83820.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/natsemi/ns83820.c b/drivers/net/ethernet/natsemi/ns83820.c
index 729095db3e08..99d3c7884a4a 100644
--- a/drivers/net/ethernet/natsemi/ns83820.c
+++ b/drivers/net/ethernet/natsemi/ns83820.c
@@ -1652,9 +1652,7 @@ static int ns83820_open(struct net_device *ndev)
writel(0, dev->base + TXDP_HI);
writel(desc, dev->base + TXDP);
- init_timer(&dev->tx_watchdog);
- dev->tx_watchdog.data = (unsigned long)ndev;
- dev->tx_watchdog.function = ns83820_tx_watch;
+ setup_timer(&dev->tx_watchdog, ns83820_tx_watch, (unsigned long)ndev);
mod_timer(&dev->tx_watchdog, jiffies + 2*HZ);
netif_start_queue(ndev); /* FIXME: wait for phy to come up */