drivers: net: dscc: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:14 +0000 (22:35 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:43 +0000 (11:44 -0700)
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>
drivers/net/wan/dscc4.c

index a043fb1..64f1764 100644 (file)
@@ -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);