drivers: net: appletalk: cops: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:31 +0000 (22:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:39 +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/appletalk/cops.c

index 486e1e6997fc8729922b6a90d910ac9d3bb2caf4..caf04284711abbf444f5d30b474c2b0bdf535660 100644 (file)
@@ -424,9 +424,7 @@ static int cops_open(struct net_device *dev)
                 */
                if(lp->board==TANGENT)  /* Poll 20 times per second */
                {
-                   init_timer(&cops_timer);
-                   cops_timer.function = cops_poll;
-                   cops_timer.data     = (unsigned long)dev;
+                   setup_timer(&cops_timer, cops_poll, (unsigned long)dev);
                    cops_timer.expires  = jiffies + HZ/20;
                    add_timer(&cops_timer);
                }