From patchwork Thu Oct 1 07:03:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Cho X-Patchwork-Id: 7305391 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 11D4DBEEA4 for ; Thu, 1 Oct 2015 07:04:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C767207F0 for ; Thu, 1 Oct 2015 07:04:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E117020687 for ; Thu, 1 Oct 2015 07:04:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754770AbbJAHE1 (ORCPT ); Thu, 1 Oct 2015 03:04:27 -0400 Received: from eusmtp01.atmel.com ([212.144.249.242]:3463 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754388AbbJAHEZ (ORCPT ); Thu, 1 Oct 2015 03:04:25 -0400 Received: from tony-itx.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.30) with Microsoft SMTP Server id 14.3.235.1; Thu, 1 Oct 2015 09:04:19 +0200 From: Tony Cho To: CC: , , , , , , , , , , , Subject: [PATCH 05/12] staging: wilc1000: remove function pointer wlan_handle_tx_que Date: Thu, 1 Oct 2015 16:03:36 +0900 Message-ID: <1443683023-6498-5-git-send-email-tony.cho@atmel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1443683023-6498-1-git-send-email-tony.cho@atmel.com> References: <1443683023-6498-1-git-send-email-tony.cho@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 From: Glen Lee This patch removes function pointer wlan_handle_tx_que and just call the function wilc_wlan_handle_txq. Remove static from the function also. There is one function call wlan_handle_tx_que which does not have an argument and return value. So put txq_count as argument and ret for return value. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/linux_wlan.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.c | 3 +-- drivers/staging/wilc1000/wilc_wlan.h | 1 + drivers/staging/wilc1000/wilc_wlan_if.h | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index e40ee8c..c2c9f3a 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -517,10 +517,10 @@ static int linux_wlan_txq_task(void *vp) } PRINT_D(TX_DBG, "txq_task handle the sending packet and let me go to sleep.\n"); #if !defined USE_TX_BACKOFF_DELAY_IF_NO_BUFFERS - g_linux_wlan->oup.wlan_handle_tx_que(); + ret = wilc_wlan_handle_txq(&txq_count); #else do { - ret = g_linux_wlan->oup.wlan_handle_tx_que(&txq_count); + ret = wilc_wlan_handle_txq(&txq_count); if (txq_count < FLOW_CONTROL_LOWER_THRESHOLD /* && netif_queue_stopped(pd->wilc_netdev)*/) { PRINT_D(TX_DBG, "Waking up queue\n"); /* netif_wake_queue(pd->wilc_netdev); */ diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index fcc4155..32045a9 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -816,7 +816,7 @@ void chip_sleep_manually(u32 u32SleepTime) * Tx, Rx queue handle functions * ********************************************/ -static int wilc_wlan_handle_txq(u32 *pu32TxqCount) +int wilc_wlan_handle_txq(u32 *pu32TxqCount) { wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan; int i, entries = 0; @@ -2028,7 +2028,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) /** * export functions **/ - oup->wlan_handle_tx_que = wilc_wlan_handle_txq; oup->wlan_handle_rx_isr = wilc_handle_isr; oup->wlan_cleanup = wilc_wlan_cleanup; oup->wlan_cfg_set = wilc_wlan_cfg_set; diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h index 2af027c..7a395cf 100644 --- a/drivers/staging/wilc1000/wilc_wlan.h +++ b/drivers/staging/wilc1000/wilc_wlan.h @@ -310,4 +310,5 @@ int wilc_wlan_start(void); 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); #endif diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 25d9d90..d41a1d4 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -122,7 +122,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int); #define WILC_TX_ERR_NO_BUF (-2) typedef struct { - int (*wlan_handle_tx_que)(u32 *); void (*wlan_handle_rx_isr)(void); void (*wlan_cleanup)(void); int (*wlan_cfg_set)(int, u32, u8 *, u32, int, u32);