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

index a408abc..c696d42 100644 (file)
@@ -293,10 +293,8 @@ static void cisco_start(struct net_device *dev)
        st->up = st->txseq = st->rxseq = 0;
        spin_unlock_irqrestore(&st->lock, flags);
 
-       init_timer(&st->timer);
+       setup_timer(&st->timer, cisco_timer, (unsigned long)dev);
        st->timer.expires = jiffies + HZ; /* First poll after 1 s */
-       st->timer.function = cisco_timer;
-       st->timer.data = (unsigned long)dev;
        add_timer(&st->timer);
 }