staging: wlan-ng: Use setup_timer
PATCH 1/1 staging: wlan-ng: Use setup_timer
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 <[email protected]>
--- drivers/staging/wlan-ng/hfa384x_usb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/staging/wlan-ng/hfa384x_usb.c +5 -9
@@ -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);
Signature · 1 line
1.9.1
Greg Kroah-Hartman
maintainerQuoted 14 lines · Vaishali Thakkar
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;
Quoted 4 lines
Signed-off-by Vaishali Thakkar <[email protected]>--- drivers/staging/wlan-ng/hfa384x_usb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
This is already in my tree :(