Skip to content

Commit

Permalink
drivers : net: niu: 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Allen Pais authored and davem330 committed Sep 21, 2017
1 parent 27dd085 commit ba4cc08
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/ethernet/sun/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6123,10 +6123,8 @@ static int niu_open(struct net_device *dev)

err = niu_init_hw(np);
if (!err) {
init_timer(&np->timer);
setup_timer(&np->timer, niu_timer, (unsigned long)np);
np->timer.expires = jiffies + HZ;
np->timer.data = (unsigned long) np;
np->timer.function = niu_timer;

err = niu_enable_interrupts(np, 1);
if (err)
Expand Down

0 comments on commit ba4cc08

Please sign in to comment.