Commit 2443c6cc authored by Geliang Tang's avatar Geliang Tang Committed by Doug Ledford

IB/qib: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: default avatarGeliang Tang <geliangtang@gmail.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 79d9df56
......@@ -3295,13 +3295,11 @@ static int init_6120_variables(struct qib_devdata *dd)
dd->rhdrhead_intr_off = 1ULL << 32;
/* setup the stats timer; the add_timer is done at end of init */
init_timer(&dd->stats_timer);
dd->stats_timer.function = qib_get_6120_faststats;
dd->stats_timer.data = (unsigned long) dd;
setup_timer(&dd->stats_timer, qib_get_6120_faststats,
(unsigned long)dd);
init_timer(&dd->cspec->pma_timer);
dd->cspec->pma_timer.function = pma_6120_timer;
dd->cspec->pma_timer.data = (unsigned long) ppd;
setup_timer(&dd->cspec->pma_timer, pma_6120_timer,
(unsigned long)ppd);
dd->ureg_align = qib_read_kreg32(dd, kr_palign);
......
......@@ -4074,9 +4074,8 @@ static int qib_init_7220_variables(struct qib_devdata *dd)
if (!qib_mini_init)
qib_write_kreg(dd, kr_rcvbthqp, QIB_KD_QP);
init_timer(&ppd->cpspec->chase_timer);
ppd->cpspec->chase_timer.function = reenable_7220_chase;
ppd->cpspec->chase_timer.data = (unsigned long)ppd;
setup_timer(&ppd->cpspec->chase_timer, reenable_7220_chase,
(unsigned long)ppd);
qib_num_cfg_vls = 1; /* if any 7220's, only one VL */
......
......@@ -6611,9 +6611,8 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
if (!qib_mini_init)
write_7322_init_portregs(ppd);
init_timer(&cp->chase_timer);
cp->chase_timer.function = reenable_chase;
cp->chase_timer.data = (unsigned long)ppd;
setup_timer(&cp->chase_timer, reenable_chase,
(unsigned long)ppd);
ppd++;
}
......@@ -6639,9 +6638,8 @@ static int qib_init_7322_variables(struct qib_devdata *dd)
(u64) rcv_int_count << IBA7322_HDRHEAD_PKTINT_SHIFT;
/* setup the stats timer; the add_timer is done at end of init */
init_timer(&dd->stats_timer);
dd->stats_timer.function = qib_get_7322_faststats;
dd->stats_timer.data = (unsigned long) dd;
setup_timer(&dd->stats_timer, qib_get_7322_faststats,
(unsigned long)dd);
dd->ureg_align = 0x10000; /* 64KB alignment */
......
......@@ -233,9 +233,8 @@ int qib_init_pportdata(struct qib_pportdata *ppd, struct qib_devdata *dd,
spin_lock_init(&ppd->cc_shadow_lock);
init_waitqueue_head(&ppd->state_wait);
init_timer(&ppd->symerr_clear_timer);
ppd->symerr_clear_timer.function = qib_clear_symerror_on_linkup;
ppd->symerr_clear_timer.data = (unsigned long)ppd;
setup_timer(&ppd->symerr_clear_timer, qib_clear_symerror_on_linkup,
(unsigned long)ppd);
ppd->qib_wq = NULL;
ppd->ibport_data.pmastats =
......@@ -429,9 +428,8 @@ static int loadtime_init(struct qib_devdata *dd)
qib_get_eeprom_info(dd);
/* setup time (don't start yet) to verify we got interrupt */
init_timer(&dd->intrchk_timer);
dd->intrchk_timer.function = verify_interrupt;
dd->intrchk_timer.data = (unsigned long) dd;
setup_timer(&dd->intrchk_timer, verify_interrupt,
(unsigned long)dd);
done:
return ret;
}
......@@ -755,9 +753,8 @@ int qib_init(struct qib_devdata *dd, int reinit)
continue;
if (dd->flags & QIB_HAS_SEND_DMA)
ret = qib_setup_sdma(ppd);
init_timer(&ppd->hol_timer);
ppd->hol_timer.function = qib_hol_event;
ppd->hol_timer.data = (unsigned long)ppd;
setup_timer(&ppd->hol_timer, qib_hol_event,
(unsigned long)ppd);
ppd->hol_state = QIB_HOL_UP;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment