From a3faf606973159ed33b8d1c17ea1678431902727 Mon Sep 17 00:00:00 2001 From: Muhammad Falak R Wani Date: Sun, 25 Oct 2015 16:13:24 +0530 Subject: [PATCH] staging: hfi1: driver: Use setup_timer Use the timer API function setup_timer instead of init_timer, removing the structure field assignments. @timer@ expression e1,e2,e3,fn_ptr; @@ -init_timer(&e1); +setup_timer(&e1, fn_ptr, e2); ... when != fn_ptr = e3 -e1.function = fn_ptr; -e1.data = e2; Signed-off-by: Muhammad Falak R Wani Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rdma/hfi1/driver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rdma/hfi1/driver.c b/drivers/staging/rdma/hfi1/driver.c index c0a59001e5cd..ef4e0c504619 100644 --- a/drivers/staging/rdma/hfi1/driver.c +++ b/drivers/staging/rdma/hfi1/driver.c @@ -1062,9 +1062,9 @@ void hfi1_set_led_override(struct hfi1_pportdata *ppd, unsigned int val) */ if (atomic_inc_return(&ppd->led_override_timer_active) == 1) { /* Need to start timer */ - init_timer(&ppd->led_override_timer); - ppd->led_override_timer.function = run_led_override; - ppd->led_override_timer.data = (unsigned long) ppd; + setup_timer(&ppd->led_override_timer, run_led_override, + (unsigned long)ppd); + ppd->led_override_timer.expires = jiffies + 1; add_timer(&ppd->led_override_timer); } else { -- 2.20.1