mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
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>
This commit is contained in:
parent
2ed343f981
commit
802be57134
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue