Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1255093
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/4] staging: rdma: ipath: Use setup_timer |
| Date | 2015-10-24 04:20 +0200 |
| Message-ID | <qmWB4-3gM-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
drivers/staging/rdma/ipath/ipath_driver.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rdma/ipath/ipath_driver.c b/drivers/staging/rdma/ipath/ipath_driver.c
index 46d9898..577704a 100644
--- a/drivers/staging/rdma/ipath/ipath_driver.c
+++ b/drivers/staging/rdma/ipath/ipath_driver.c
@@ -2307,10 +2307,9 @@ void ipath_set_led_override(struct ipath_devdata *dd, unsigned int val)
*/
if (atomic_inc_return(&dd->ipath_led_override_timer_active) == 1) {
/* Need to start timer */
- init_timer(&dd->ipath_led_override_timer);
- dd->ipath_led_override_timer.function =
- ipath_run_led_override;
- dd->ipath_led_override_timer.data = (unsigned long) dd;
+ setup_timer(&dd->ipath_led_override_timer,
+ ipath_run_led_override, (unsigned long)dd);
+
dd->ipath_led_override_timer.expires = jiffies + 1;
add_timer(&dd->ipath_led_override_timer);
} else
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/4] staging: rdma: ipath: Use setup_timer Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-10-24 04:20 +0200 Re: [PATCH 1/4] staging: rdma: ipath: Use setup_timer Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-10-25 09:30 +0100
csiph-web