]> git.samba.org - sfrench/cifs-2.6.git/commitdiff
drivers: net: declance: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:28 +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/ethernet/amd/declance.c

index 82cc81385033009a0147c8d647808a706a0ddfc3..9bdf81c2cd00c1e504131966ebc8c0664fa9d093 100644 (file)
@@ -1246,9 +1246,9 @@ static int dec_lance_probe(struct device *bdev, const int type)
         * can occur from interrupts (ex. IPv6).  So we
         * use a timer to try again later when necessary. -DaveM
         */
-       init_timer(&lp->multicast_timer);
-       lp->multicast_timer.data = (unsigned long) dev;
-       lp->multicast_timer.function = lance_set_multicast_retry;
+       setup_timer(&lp->multicast_timer, lance_set_multicast_retry,
+                   (unsigned long)dev);
+
 
        ret = register_netdev(dev);
        if (ret) {