summaryrefslogtreecommitdiff
path: root/drivers/net/wan/hdlc_fr.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2017-09-21 15:47:55 +0300
committerDavid S. Miller <davem@davemloft.net>2017-09-22 01:48:46 +0300
commit802be571348681a8ee052850e47b9652de7e05d4 (patch)
treec695ddd64536e7fb9a67c9dfad8e873b01be9afb /drivers/net/wan/hdlc_fr.c
parent2ed343f98178ff232b504bbd006b34db07835082 (diff)
downloadlinux-802be571348681a8ee052850e47b9652de7e05d4.tar.xz
net: wan : hdlc: 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/wan/hdlc_fr.c')
-rw-r--r--drivers/net/wan/hdlc_fr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index 78596e42a3f3..425a47ffed25 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -1003,11 +1003,10 @@ static void fr_start(struct net_device *dev)
state(hdlc)->n391cnt = 0;
state(hdlc)->txseq = state(hdlc)->rxseq = 0;
- init_timer(&state(hdlc)->timer);
+ setup_timer(&state(hdlc)->timer, fr_timer,
+ (unsigned long)dev);
/* First poll after 1 s */
state(hdlc)->timer.expires = jiffies + HZ;
- state(hdlc)->timer.function = fr_timer;
- state(hdlc)->timer.data = (unsigned long)dev;
add_timer(&state(hdlc)->timer);
} else
fr_set_link_state(1, dev);