[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150208072045.GA5265@vaishali-Ideapad-Z570>
Date: Sun, 8 Feb 2015 12:50:45 +0530
From: Vaishali Thakkar <vthakkar1994@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: [PATCH] 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 <vthakkar1994@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists