Commit a3faf606 authored by Muhammad Falak R Wani's avatar Muhammad Falak R Wani Committed by Greg Kroah-Hartman

staging: hfi1: driver: Use setup_timer

Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

<smpl>

@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;

</smpl>
Signed-off-by: default avatarMuhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent af28398d
...@@ -1062,9 +1062,9 @@ void hfi1_set_led_override(struct hfi1_pportdata *ppd, unsigned int val) ...@@ -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) { if (atomic_inc_return(&ppd->led_override_timer_active) == 1) {
/* Need to start timer */ /* Need to start timer */
init_timer(&ppd->led_override_timer); setup_timer(&ppd->led_override_timer, run_led_override,
ppd->led_override_timer.function = run_led_override; (unsigned long)ppd);
ppd->led_override_timer.data = (unsigned long) ppd;
ppd->led_override_timer.expires = jiffies + 1; ppd->led_override_timer.expires = jiffies + 1;
add_timer(&ppd->led_override_timer); add_timer(&ppd->led_override_timer);
} else { } else {
......
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