Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751601AbbBHHUw (ORCPT ); Sun, 8 Feb 2015 02:20:52 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:62618 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750736AbbBHHUu (ORCPT ); Sun, 8 Feb 2015 02:20:50 -0500 Date: Sun, 8 Feb 2015 12:50:45 +0530 From: Vaishali Thakkar To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH] staging: wlan-ng: Use setup_timer Message-ID: <20150208072045.GA5265@vaishali-Ideapad-Z570> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1728 Lines: 54 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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/