Skip to content

Commit

Permalink
net: wan : hdlc: use setup_timer() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Allen Pais authored and David S. Miller committed Sep 21, 2017
1 parent 2ed343f commit 802be57
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/wan/hdlc_fr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 802be57

Please sign in to comment.