All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: wlan-ng: Use setup_timer
@ 2015-02-08  7:20 Vaishali Thakkar
  2015-03-07  0:13 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Vaishali Thakkar @ 2015-02-08  7:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, devel

This patch introduces the use of function setup_timer.

This is done using Coccinelle and semantic patch used is
as follows:

@@
expression x,y,z;
@@

- init_timer (&x);
+ setup_timer (&x, y, z);
- x.function = y;
- x.data = z;

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x_usb.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 2245339..77066a1 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -557,17 +557,13 @@ void hfa384x_create(hfa384x_t *hw, struct usb_device *usb)
 	INIT_WORK(&hw->link_bh, prism2sta_processing_defer);
 	INIT_WORK(&hw->usb_work, hfa384x_usb_defer);
 
-	init_timer(&hw->throttle);
-	hw->throttle.function = hfa384x_usb_throttlefn;
-	hw->throttle.data = (unsigned long)hw;
+	setup_timer(&hw->throttle, hfa384x_usb_throttlefn, (unsigned long)hw);
 
-	init_timer(&hw->resptimer);
-	hw->resptimer.function = hfa384x_usbctlx_resptimerfn;
-	hw->resptimer.data = (unsigned long)hw;
+	setup_timer(&hw->resptimer, hfa384x_usbctlx_resptimerfn,
+		    (unsigned long)hw);
 
-	init_timer(&hw->reqtimer);
-	hw->reqtimer.function = hfa384x_usbctlx_reqtimerfn;
-	hw->reqtimer.data = (unsigned long)hw;
+	setup_timer(&hw->reqtimer, hfa384x_usbctlx_reqtimerfn,
+		    (unsigned long)hw);
 
 	usb_init_urb(&hw->rx_urb);
 	usb_init_urb(&hw->tx_urb);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: wlan-ng: Use setup_timer
  2015-02-08  7:20 [PATCH] staging: wlan-ng: Use setup_timer Vaishali Thakkar
@ 2015-03-07  0:13 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2015-03-07  0:13 UTC (permalink / raw)
  To: Vaishali Thakkar; +Cc: linux-kernel, devel

On Sun, Feb 08, 2015 at 12:50:45PM +0530, Vaishali Thakkar wrote:
> This patch introduces the use of function setup_timer.
> 
> This is done using Coccinelle and semantic patch used is
> as follows:
> 
> @@
> expression x,y,z;
> @@
> 
> - init_timer (&x);
> + setup_timer (&x, y, z);
> - x.function = y;
> - x.data = z;
> 
> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
> ---
>  drivers/staging/wlan-ng/hfa384x_usb.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)

This is already in my tree :(

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-07 10:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-08  7:20 [PATCH] staging: wlan-ng: Use setup_timer Vaishali Thakkar
2015-03-07  0:13 ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.