]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drivers: net: smsc: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:50 +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/ethernet/smsc/epic100.c

index 6a0e1d4b597c8e7e9fe8086d3a476ebc717b9e91..2a9724898fcfe822eeef6d7416889e0aaac37462 100644 (file)
@@ -739,10 +739,8 @@ static int epic_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(&ep->timer);
+       setup_timer(&ep->timer, epic_timer, (unsigned long)dev);
        ep->timer.expires = jiffies + 3*HZ;
-       ep->timer.data = (unsigned long)dev;
-       ep->timer.function = epic_timer;                                /* timer handler */
        add_timer(&ep->timer);
 
        return rc;