IB/qib,staging/rdma/hfi1: use setup_timer api
authorHari Prasath Gujulan Elango <hgujulan@visteon.com>
Thu, 4 Feb 2016 19:03:45 +0000 (11:03 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:38:05 +0000 (20:38 -0500)
Replace the timer API's to initialize a timer & then assign the callback
function by the setup_timer() API.

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qib/qib_verbs.c
drivers/staging/rdma/hfi1/verbs.c

index 41583629b146e1f10c003069533390cfccd4cbb8..2abe31d4e35065b8ceaa2920fcf34a877acfb362 100644 (file)
@@ -1602,9 +1602,7 @@ int qib_register_ib_device(struct qib_devdata *dd)
                init_ibport(ppd + i);
 
        /* Only need to initialize non-zero fields. */
-       init_timer(&dev->mem_timer);
-       dev->mem_timer.function = mem_timer;
-       dev->mem_timer.data = (unsigned long) dev;
+       setup_timer(&dev->mem_timer, mem_timer, (unsigned long)dev);
 
        qpt_mask = dd->qpn_mask;
 
index 0ee6b1debd058b852ce1186697abae8f19851e45..35f6d92a6249a1ee9a0f9959947e74364c011e92 100644 (file)
@@ -1455,9 +1455,7 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
 
        /* Only need to initialize non-zero fields. */
 
-       init_timer(&dev->mem_timer);
-       dev->mem_timer.function = mem_timer;
-       dev->mem_timer.data = (unsigned long) dev;
+       setup_timer(&dev->mem_timer, mem_timer, (unsigned long)dev);
 
        seqlock_init(&dev->iowait_lock);
        INIT_LIST_HEAD(&dev->txwait);