Commit f2803332 authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

drivers: net: dscc: use setup_timer() helper.

Use setup_timer function instead of initializing timer with the
    function and data fields.
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ba7400ed
...@@ -1127,10 +1127,8 @@ static int dscc4_open(struct net_device *dev) ...@@ -1127,10 +1127,8 @@ static int dscc4_open(struct net_device *dev)
done: done:
netif_start_queue(dev); 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.expires = jiffies + 10*HZ;
dpriv->timer.data = (unsigned long)dev;
dpriv->timer.function = dscc4_timer;
add_timer(&dpriv->timer); add_timer(&dpriv->timer);
netif_carrier_on(dev); netif_carrier_on(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment