From patchwork Fri Oct 23 05:28:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7470131 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 25A39BEEA4 for ; Fri, 23 Oct 2015 05:26:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 611E8204A0 for ; Fri, 23 Oct 2015 05:26:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 817C52049D for ; Fri, 23 Oct 2015 05:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751237AbbJWF0G (ORCPT ); Fri, 23 Oct 2015 01:26:06 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:51673 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbbJWF0E (ORCPT ); Fri, 23 Oct 2015 01:26:04 -0400 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Fri, 23 Oct 2015 07:25:57 +0200 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH 02/28] staging: wicl1000: isr_uh_routine: use netdev private wilc Date: Fri, 23 Oct 2015 14:28:18 +0900 Message-ID: <1445578124-31486-2-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445578124-31486-1-git-send-email-glen.lee@atmel.com> References: <1445578124-31486-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 Use netdev private member wilc instead of g_linux_wlan and Change argument wilc with dev in the function request_threaded_irq to pass back to handler the function isr_uh_routine. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index b036b96..7b0614d 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -229,10 +229,15 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event #if (defined WILC_SPI) || (defined WILC_SDIO_IRQ_GPIO) static irqreturn_t isr_uh_routine(int irq, void *user_data) { + perInterface_wlan_t *nic; + struct wilc *wl; + + nic = netdev_priv(usedata); + wl = nic->wilc; PRINT_D(INT_DBG, "Interrupt received UH\n"); /*While mac is closing cacncel the handling of any interrupts received*/ - if (g_linux_wlan->close) { + if (wl->close) { PRINT_ER("Driver is CLOSING: Can't handle UH interrupt\n"); return IRQ_HANDLED; } @@ -284,7 +289,7 @@ static int init_irq(struct net_device *dev) if ((ret != -1) && (request_threaded_irq(wl->dev_irq_num, isr_uh_routine, isr_bh_routine, IRQF_TRIGGER_LOW | IRQF_ONESHOT, /*Without IRQF_ONESHOT the uh will remain kicked in and dont gave a chance to bh*/ - "WILC_IRQ", wl)) < 0) { + "WILC_IRQ", dev)) < 0) { PRINT_ER("Failed to request IRQ for GPIO: %d\n", GPIO_NUM); ret = -1;