drivers: net: arcnet: 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:
Allen Pais 2017-09-21 22:34:58 +05:30 committed by David S. Miller
parent 9f5ca8816b
commit fe9bfe207e
1 changed files with 1 additions and 3 deletions

View File

@ -450,9 +450,7 @@ struct net_device *alloc_arcdev(const char *name)
lp->dev = dev;
spin_lock_init(&lp->lock);
init_timer(&lp->timer);
lp->timer.data = (unsigned long) dev;
lp->timer.function = arcnet_timer;
setup_timer(&lp->timer, arcnet_timer, (unsigned long)dev);
}
return dev;