]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drivers: net: pcnet32: use setup_timer() helper.
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 17:04:24 +0000 (22:34 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Sep 2017 18:44:39 +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/pcnet32.c

index 7f60d17819cea4db52eef5650dab39d6ac936d1d..e4615365401646ad94f1c5d389bfcfbef168a417 100644 (file)
@@ -1970,9 +1970,8 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
                        lp->options |= PCNET32_PORT_MII;
        }
 
-       init_timer(&lp->watchdog_timer);
-       lp->watchdog_timer.data = (unsigned long)dev;
-       lp->watchdog_timer.function = (void *)&pcnet32_watchdog;
+       setup_timer(&lp->watchdog_timer, (void *)&pcnet32_watchdog,
+                   (unsigned long)dev);
 
        /* The PCNET32-specific entries in the device structure. */
        dev->netdev_ops = &pcnet32_netdev_ops;