summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 20:04:33 +0300
committerDavid S. Miller <davem@davemloft.net>2017-09-21 21:44:40 +0300
commite7bbad4487ae4005904d00a0a04622f07fadbc5b (patch)
tree4d3a11286784fded471534360b56f3ccc71d1532 /drivers
parent531f3ce953d4c74989eb1ece7ce37a3717532a13 (diff)
downloadlinux-e7bbad4487ae4005904d00a0a04622f07fadbc5b.tar.xz
drivers: net: atp: 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')
-rw-r--r--drivers/net/ethernet/realtek/atp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/realtek/atp.c b/drivers/net/ethernet/realtek/atp.c
index bed34684994f..bdc3833fab7e 100644
--- a/drivers/net/ethernet/realtek/atp.c
+++ b/drivers/net/ethernet/realtek/atp.c
@@ -438,10 +438,8 @@ static int net_open(struct net_device *dev)
hardware_init(dev);
- init_timer(&lp->timer);
+ setup_timer(&lp->timer, atp_timed_checker, (unsigned long)dev);
lp->timer.expires = jiffies + TIMED_CHECKER;
- lp->timer.data = (unsigned long)dev;
- lp->timer.function = atp_timed_checker; /* timer handler */
add_timer(&lp->timer);
netif_start_queue(dev);