From patchwork Tue Oct 27 09:27:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7494971 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 15557BEEA4 for ; Tue, 27 Oct 2015 09:25:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4518420849 for ; Tue, 27 Oct 2015 09:25:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4893E20841 for ; Tue, 27 Oct 2015 09:25:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753329AbbJ0JZT (ORCPT ); Tue, 27 Oct 2015 05:25:19 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:57855 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752229AbbJ0JZS (ORCPT ); Tue, 27 Oct 2015 05:25:18 -0400 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Tue, 27 Oct 2015 10:25:15 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH V2 03/27] staging: wilc1000: deinit_irq: use wilc instead of g_linux_wlan Date: Tue, 27 Oct 2015 18:27:39 +0900 Message-ID: <1445938083-20445-3-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445938083-20445-1-git-send-email-glen.lee@atmel.com> References: <1445938083-20445-1-git-send-email-glen.lee@atmel.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch changes function parameter linux_wlan_t nic with net_dev dev and use netdev private data member wilc instead of nic and g_linux_wlan. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 7d0d722..ac2bc06 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -310,12 +310,18 @@ static int init_irq(struct net_device *dev) } #endif -static void deinit_irq(struct wilc *nic) +static void deinit_irq(struct net_device *dev) { + perInterface_wlan_t *nic; + struct wilc *wilc; + + nic = netdev_priv(dev); + wilc = nic->wilc; + #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) /* Deintialize IRQ */ - if (&nic->dev_irq_num != 0) { - free_irq(nic->dev_irq_num, g_linux_wlan); + if (&wilc->dev_irq_num != 0) { + free_irq(wilc->dev_irq_num, wilc); gpio_free(GPIO_NUM); } @@ -907,7 +913,7 @@ void wilc1000_wlan_deinit(struct net_device *dev) wlan_deinitialize_threads(wl); PRINT_D(INIT_DBG, "Deinitializing IRQ\n"); - deinit_irq(wl); + deinit_irq(dev); wilc_wlan_stop(); @@ -1144,7 +1150,7 @@ _fail_irq_enable_: _fail_irq_init_: #endif #if (!defined WILC_SDIO) || (defined WILC_SDIO_IRQ_GPIO) - deinit_irq(wl); + deinit_irq(dev); #endif wlan_deinitialize_threads(wl);