OSDN Git Service

drivers: net: amd: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:09 +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/ethernet/amd/a2065.c

index e22f976..998d30e 100644 (file)
@@ -733,10 +733,9 @@ static int a2065_init_one(struct zorro_dev *z,
        dev->watchdog_timeo = 5*HZ;
        dev->dma = 0;
 
-       init_timer(&priv->multicast_timer);
-       priv->multicast_timer.data = (unsigned long) dev;
-       priv->multicast_timer.function =
-               (void (*)(unsigned long))lance_set_multicast;
+       setup_timer(&priv->multicast_timer,
+                   (void(*)(unsigned long))lance_set_multicast,
+                   (unsigned long)dev);
 
        err = register_netdev(dev);
        if (err) {