Skip to content

Commit

Permalink
drivers: net: dmfe: 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 34b0cf0 commit a76aec2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/dec/tulip/dmfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,8 @@ static int dmfe_open(struct net_device *dev)
netif_wake_queue(dev);

/* set and active a timer process */
init_timer(&db->timer);
setup_timer(&db->timer, dmfe_timer, (unsigned long)dev);
db->timer.expires = DMFE_TIMER_WUT + HZ * 2;
db->timer.data = (unsigned long)dev;
db->timer.function = dmfe_timer;
add_timer(&db->timer);

return 0;
Expand Down

0 comments on commit a76aec2

Please sign in to comment.