drivers: net: uli526x: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:05:21 +0000 (22:35 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:44 +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/dec/tulip/uli526x.c

index 7fc248efc4baa4e259945978e741d767a4aa1b63..5fbbc0caba99447bf930799c5068ab06fc2d8182 100644 (file)
@@ -491,10 +491,8 @@ static int uli526x_open(struct net_device *dev)
        netif_wake_queue(dev);
 
        /* set and active a timer process */
-       init_timer(&db->timer);
+       setup_timer(&db->timer, uli526x_timer, (unsigned long)dev);
        db->timer.expires = ULI526X_TIMER_WUT + HZ * 2;
-       db->timer.data = (unsigned long)dev;
-       db->timer.function = uli526x_timer;
        add_timer(&db->timer);
 
        return 0;