From patchwork Fri Nov 6 09:40:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7567781 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 1F37FC05C6 for ; Fri, 6 Nov 2015 09:39:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2330D20761 for ; Fri, 6 Nov 2015 09:39:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 119AD2075F for ; Fri, 6 Nov 2015 09:39:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161088AbbKFJjq (ORCPT ); Fri, 6 Nov 2015 04:39:46 -0500 Received: from eusmtp01.atmel.com ([212.144.249.242]:47677 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032934AbbKFJjo (ORCPT ); Fri, 6 Nov 2015 04:39:44 -0500 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, 6 Nov 2015 10:39:36 +0100 From: Glen Lee To: CC: , , , , , , , , Subject: [PATCH 25/26] staging: wilc1000: change parameter type of hif_init Date: Fri, 6 Nov 2015 18:40:22 +0900 Message-ID: <1446802823-22598-26-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446802823-22598-1-git-send-email-glen.lee@atmel.com> References: <1446802823-22598-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, T_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 parameter type wilc_wlan_inp_t with struct wilc and modify it's related code. Pass wilc to the functions as well. wilc will be used in later patch. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/wilc_sdio.c | 3 ++- drivers/staging/wilc1000/wilc_spi.c | 3 ++- drivers/staging/wilc1000/wilc_wlan.c | 8 ++++++-- drivers/staging/wilc1000/wilc_wlan.h | 4 ++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_sdio.c b/drivers/staging/wilc1000/wilc_sdio.c index a5307a7..8aacf55 100644 --- a/drivers/staging/wilc1000/wilc_sdio.c +++ b/drivers/staging/wilc1000/wilc_sdio.c @@ -11,6 +11,7 @@ #include "wilc_wlan_if.h" #include "wilc_wlan.h" #include "linux_wlan_sdio.h" +#include "wilc_wfi_netdevice.h" #define WILC_SDIO_BLOCK_SIZE 512 @@ -550,7 +551,7 @@ static int sdio_sync(void) return 1; } -static int sdio_init(wilc_wlan_inp_t *inp, wilc_debug_func func) +static int sdio_init(struct wilc *wilc, wilc_debug_func func) { sdio_cmd52_t cmd; int loop; diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 5a6bbfd..3741836 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -11,6 +11,7 @@ #include "wilc_wlan_if.h" #include "wilc_wlan.h" #include "linux_wlan_spi.h" +#include "wilc_wfi_netdevice.h" typedef struct { wilc_debug_func dPrint; @@ -945,7 +946,7 @@ static int wilc_spi_sync(void) return 1; } -static int wilc_spi_init(wilc_wlan_inp_t *inp, wilc_debug_func func) +static int wilc_spi_init(struct wilc *wilc, wilc_debug_func func) { u32 reg; u32 chipid; diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 2ce5870..9d257b0 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1655,6 +1655,10 @@ _fail_: int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp) { int ret = 0; + perInterface_wlan_t *nic = netdev_priv(dev); + struct wilc *wilc; + + wilc = nic->wilc; PRINT_D(INIT_DBG, "Initializing WILC_Wlan ...\n"); @@ -1663,14 +1667,14 @@ int wilc_wlan_init(struct net_device *dev, wilc_wlan_inp_t *inp) sizeof(wilc_wlan_io_func_t)); #ifdef WILC_SDIO - if (!hif_sdio.hif_init(inp, wilc_debug)) { + if (!hif_sdio.hif_init(wilc, wilc_debug)) { ret = -EIO; goto _fail_; } memcpy((void *)&g_wlan.hif_func, &hif_sdio, sizeof(struct wilc_hif_func)); #else - if (!hif_spi.hif_init(inp, wilc_debug)) { + if (!hif_spi.hif_init(wilc, wilc_debug)) { ret = -EIO; goto _fail_; } diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index ff4872f..64fd019 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -235,9 +235,9 @@ struct rxq_entry_t { * Host IF Structure * ********************************************/ - +struct wilc; struct wilc_hif_func { - int (*hif_init)(wilc_wlan_inp_t *, wilc_debug_func); + int (*hif_init)(struct wilc *, wilc_debug_func); int (*hif_deinit)(void *); int (*hif_read_reg)(u32, u32 *); int (*hif_write_reg)(u32, u32);