]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drivers: net: arcnet: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:58 +0000 (22:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:42 +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/arcnet/arcnet.c

index fcfccbb3d9a2a0e5a6a84ee0daea317e5d2b32b6..13236b2cdf13c3e0201ab3f978c8cfb941bfa410 100644 (file)
@@ -450,9 +450,7 @@ struct net_device *alloc_arcdev(const char *name)
 
                lp->dev = dev;
                spin_lock_init(&lp->lock);
-               init_timer(&lp->timer);
-               lp->timer.data = (unsigned long) dev;
-               lp->timer.function = arcnet_timer;
+               setup_timer(&lp->timer, arcnet_timer, (unsigned long)dev);
        }
 
        return dev;