mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
drivers: net: dscc: 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:
parent
ba7400ed88
commit
f2803332f2
1 changed files with 1 additions and 3 deletions
|
@ -1127,10 +1127,8 @@ static int dscc4_open(struct net_device *dev)
|
|||
done:
|
||||
netif_start_queue(dev);
|
||||
|
||||
init_timer(&dpriv->timer);
|
||||
setup_timer(&dpriv->timer, dscc4_timer, (unsigned long)dev);
|
||||
dpriv->timer.expires = jiffies + 10*HZ;
|
||||
dpriv->timer.data = (unsigned long)dev;
|
||||
dpriv->timer.function = dscc4_timer;
|
||||
add_timer(&dpriv->timer);
|
||||
netif_carrier_on(dev);
|
||||
|
||||
|
|
Loading…
Reference in a new issue