OSDN Git Service

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

index 71ddadb..76cc140 100644 (file)
@@ -1229,10 +1229,8 @@ static int rr_open(struct net_device *dev)
 
        /* Set the timer to switch to check for link beat and perhaps switch
           to an alternate media type. */
-       init_timer(&rrpriv->timer);
+       setup_timer(&rrpriv->timer, rr_timer, (unsigned long)dev);
        rrpriv->timer.expires = RUN_AT(5*HZ);           /* 5 sec. watchdog */
-       rrpriv->timer.data = (unsigned long)dev;
-       rrpriv->timer.function = rr_timer;               /* timer handler */
        add_timer(&rrpriv->timer);
 
        netif_start_queue(dev);