staging: ipath: ipath_sdma: Use setup_timer
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Sun, 25 Oct 2015 10:17:32 +0000 (15:47 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 19:09:16 +0000 (04:09 +0900)
Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rdma/ipath/ipath_sdma.c

index 17a517766ad27b822ba1b77780601a44f7219a7e..1ffc06abf9da5c56f25cb9a183d5384635713e99 100644 (file)
@@ -400,9 +400,9 @@ static int alloc_sdma(struct ipath_devdata *dd)
        }
        dd->ipath_sdma_head_dma[0] = 0;
 
-       init_timer(&dd->ipath_sdma_vl15_timer);
-       dd->ipath_sdma_vl15_timer.function = vl15_watchdog_timeout;
-       dd->ipath_sdma_vl15_timer.data = (unsigned long)dd;
+       setup_timer(&dd->ipath_sdma_vl15_timer, vl15_watchdog_timeout,
+                       (unsigned long)dd);
+
        atomic_set(&dd->ipath_sdma_vl15_count, 0);
 
        goto done;