Skip to content

Commit

Permalink
drivers: net: appletalk: 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 7890d53 commit ba7400e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/appletalk/ltpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1165,9 +1165,7 @@ struct net_device * __init ltpc_probe(void)
dev->irq = 0;
/* polled mode -- 20 times per second */
/* this is really, really slow... should it poll more often? */
init_timer(&ltpc_timer);
ltpc_timer.function=ltpc_poll;
ltpc_timer.data = (unsigned long) dev;
setup_timer(&ltpc_timer, ltpc_poll, (unsigned long)dev);

ltpc_timer.expires = jiffies + HZ/20;
add_timer(&ltpc_timer);
Expand Down

0 comments on commit ba7400e

Please sign in to comment.