From patchwork Fri Oct 23 05:28:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7470161 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 C8285BEEA4 for ; Fri, 23 Oct 2015 05:26:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EF36A207B6 for ; Fri, 23 Oct 2015 05:26:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE210207B4 for ; Fri, 23 Oct 2015 05:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751309AbbJWF0Y (ORCPT ); Fri, 23 Oct 2015 01:26:24 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:51728 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbbJWF0Y (ORCPT ); Fri, 23 Oct 2015 01:26:24 -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:26:16 +0200 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH 05/28] staging: wilc1000: wilc_handle_isr: add argument wilc to wilc_handle_isr Date: Fri, 23 Oct 2015 14:28:21 +0900 Message-ID: <1445578124-31486-5-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 This patch add new argument wilc to wilc_handle_isr and pass wilc to the function. It is void type for now because wilc_wlan.c was implemented platform independently at the beginning (linux_wlan.c is implementation of LINUX part) so the struct wilc header file cannot be included at this moment, but this driver is dedicated to LINUX so wilc_wlan.c and linux_wlan.c will be merged. After that, this void type will be changed with struct wilc as well as other functions which are using void type in wilc_wlan.h. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/linux_wlan_sdio.c | 7 +++++-- drivers/staging/wilc1000/wilc_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wlan.h | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 75cbacf..3f5ae55 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -260,7 +260,7 @@ irqreturn_t isr_bh_routine(int irq, void *userdata) } PRINT_D(INT_DBG, "Interrupt received BH\n"); - wilc_handle_isr(); + wilc_handle_isr(wl); return IRQ_HANDLED; } diff --git a/drivers/staging/wilc1000/linux_wlan_sdio.c b/drivers/staging/wilc1000/linux_wlan_sdio.c index 1f8d874..4aff953 100644 --- a/drivers/staging/wilc1000/linux_wlan_sdio.c +++ b/drivers/staging/wilc1000/linux_wlan_sdio.c @@ -27,7 +27,6 @@ struct wilc_sdio { }; struct sdio_func *local_sdio_func; -extern void wilc_handle_isr(void); static unsigned int sdio_default_speed; @@ -42,9 +41,13 @@ static const struct sdio_device_id wilc_sdio_ids[] = { static void wilc_sdio_interrupt(struct sdio_func *func) { + struct wilc_sdio *wl_sdio; + + wl_sdio = sdio_get_drvdata(func); + #ifndef WILC_SDIO_IRQ_GPIO sdio_release_host(func); - wilc_handle_isr(); + wilc_handle_isr(wl_sdio->wilc); sdio_claim_host(func); #endif } diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 67b0c52..be6f631 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1353,7 +1353,7 @@ _end_: wilc_wlan_handle_rxq(); } -void wilc_handle_isr(void) +void wilc_handle_isr(void *wilc) { u32 int_status; diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index bd89689..a07375b 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -301,7 +301,7 @@ int wilc_wlan_stop(void); int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, wilc_tx_complete_func_t func); int wilc_wlan_handle_txq(u32 *pu32TxqCount); -void wilc_handle_isr(void); +void wilc_handle_isr(void *wilc); void wilc_wlan_cleanup(void); int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size, int commit, u32 drvHandler);