ambassador: use setup_timer
authorGeliang Tang <geliangtang@gmail.com>
Sat, 11 Mar 2017 00:46:56 +0000 (08:46 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Mar 2017 06:47:16 +0000 (23:47 -0700)
Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/atm/ambassador.c

index 4a61079..906705e 100644 (file)
@@ -2267,9 +2267,8 @@ static int amb_probe(struct pci_dev *pci_dev,
        dev->atm_dev->ci_range.vpi_bits = NUM_VPI_BITS;
        dev->atm_dev->ci_range.vci_bits = NUM_VCI_BITS;
 
-       init_timer(&dev->housekeeping);
-       dev->housekeeping.function = do_housekeeping;
-       dev->housekeeping.data = (unsigned long) dev;
+       setup_timer(&dev->housekeeping, do_housekeeping,
+                   (unsigned long)dev);
        mod_timer(&dev->housekeeping, jiffies);
 
        // enable host interrupts