aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/hfi1/driver.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2017-10-18 13:12:09 -0400
committerDoug Ledford <dledford@redhat.com>2017-10-18 13:12:09 -0400
commit894b82c427d069a773e1d1417fe30bd31aa18801 (patch)
tree8b361de9085f7891b4a673064b55f34b17bccb1e /drivers/infiniband/hw/hfi1/driver.c
parentMerge branch 'for-next-early' into for-next (diff)
parentRDMA/cxgb4: Convert timers to use timer_setup() (diff)
downloadlinux-dev-894b82c427d069a773e1d1417fe30bd31aa18801.tar.xz
linux-dev-894b82c427d069a773e1d1417fe30bd31aa18801.zip
Merge branch 'timer_setup' into for-next
Conflicts: drivers/infiniband/hw/cxgb4/cm.c drivers/infiniband/hw/qib/qib_driver.c drivers/infiniband/hw/qib/qib_mad.c There were minor fixups needed in these files. Just minor context diffs due to patches from independent sources touching the same basic area. Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hfi1/driver.c')
-rw-r--r--drivers/infiniband/hw/hfi1/driver.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/hfi1/driver.c b/drivers/infiniband/hw/hfi1/driver.c
index b4f69c07ca2a..07a32a1c1303 100644
--- a/drivers/infiniband/hw/hfi1/driver.c
+++ b/drivers/infiniband/hw/hfi1/driver.c
@@ -1258,9 +1258,9 @@ void shutdown_led_override(struct hfi1_pportdata *ppd)
write_csr(dd, DCC_CFG_LED_CNTRL, 0);
}
-static void run_led_override(unsigned long opaque)
+static void run_led_override(struct timer_list *t)
{
- struct hfi1_pportdata *ppd = (struct hfi1_pportdata *)opaque;
+ struct hfi1_pportdata *ppd = from_timer(ppd, t, led_override_timer);
struct hfi1_devdata *dd = ppd->dd;
unsigned long timeout;
int phase_idx;
@@ -1304,8 +1304,7 @@ void hfi1_start_led_override(struct hfi1_pportdata *ppd, unsigned int timeon,
* timeout so the handler will be called soon to look at our request.
*/
if (!timer_pending(&ppd->led_override_timer)) {
- setup_timer(&ppd->led_override_timer, run_led_override,
- (unsigned long)ppd);
+ timer_setup(&ppd->led_override_timer, run_led_override, 0);
ppd->led_override_timer.expires = jiffies + 1;
add_timer(&ppd->led_override_timer);
atomic_set(&ppd->led_override_timer_active, 1);