From patchwork Mon Jun 19 20:18:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 9797735 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 137F0601C8 for ; Mon, 19 Jun 2017 20:19:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0580C28423 for ; Mon, 19 Jun 2017 20:19:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE39928456; Mon, 19 Jun 2017 20:19:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB17028445 for ; Mon, 19 Jun 2017 20:19:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752366AbdFSUSn (ORCPT ); Mon, 19 Jun 2017 16:18:43 -0400 Received: from smtprelay0220.hostedemail.com ([216.40.44.220]:53061 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752335AbdFSUSl (ORCPT ); Mon, 19 Jun 2017 16:18:41 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 007B2100E86CB; Mon, 19 Jun 2017 20:18:34 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: humor13_4ac01c8e7475e X-Filterd-Recvd-Size: 5361 Received: from joe-laptop.perches.com (unknown [47.151.132.55]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Mon, 19 Jun 2017 20:18:33 +0000 (UTC) From: Joe Perches To: linux-kernel@vger.kernel.org Cc: Larry Finger , Chaoming Li , Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 5/5] realtek: rtlwifi: drivers: Use the rtl_btc convenience macro Date: Mon, 19 Jun 2017 13:18:18 -0700 Message-Id: X-Mailer: git-send-email 2.10.0.rc2.1.g053435c In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Convert the uses of the btcoexist. to the rtl_btc macro to save a few lines of code. Signed-off-by: Joe Perches --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c | 4 +--- drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c | 3 +-- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c | 6 ++---- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 +-- 6 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c index 11d97fa0e921..9fc3e79e5a43 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c @@ -2572,8 +2572,7 @@ void rtl92ee_bt_hw_init(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_init_hw_config(rtlpriv); + rtl_btc(rtlpriv, rtlpriv->cfg->ops, btc_init_hw_config(rtlpriv)); } void rtl92ee_suspend(struct ieee80211_hw *hw) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c index ec9bcf32f0ab..8621ea8f6644 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c @@ -1767,9 +1767,7 @@ void rtl_8723e_c2h_command_handle(struct ieee80211_hw *hw) rtl8723e_dm_bt_parse_bt_info(hw, ptmp_buf, c2h_event.cmd_len); - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_periodical(rtlpriv); - + rtl_btc(rtlpriv, rtlpriv->cfg->ops, btc_periodical(rtlpriv)); break; default: break; diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c index 5ac7b815648a..3b6d140bb863 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/hw.c @@ -2419,8 +2419,7 @@ void rtl8723e_bt_hw_init(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_init_hw_config(rtlpriv); + rtl_btc(rtlpriv, rtlpriv->cfg->ops, btc_init_hw_config(rtlpriv)); } void rtl8723e_suspend(struct ieee80211_hw *hw) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c index a79f936bb394..bddc4f56832d 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c @@ -2719,8 +2719,7 @@ void rtl8723be_bt_hw_init(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_init_hw_config(rtlpriv); + rtl_btc(rtlpriv, rtlpriv->cfg->ops, btc_init_hw_config(rtlpriv)); } diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c index 73350103b736..a7a537716a8e 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/fw.c @@ -1879,10 +1879,8 @@ void rtl8821ae_c2h_content_parsing(struct ieee80211_hw *hw, case C2H_8812_BT_INFO: RT_TRACE(rtlpriv, COMP_FW, DBG_LOUD, "[C2H], C2H_8812_BT_INFO!!\n"); - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_btinfo_notify(rtlpriv, - tmp_buf, - c2h_cmd_len); + rtl_btc(rtlpriv, rtlpriv->cfg->ops, + btc_btinfo_notify(rtlpriv, tmp_buf, c2h_cmd_len)); break; default: break; diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c index 2bc6bace069c..f76c64570d16 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c @@ -4012,8 +4012,7 @@ void rtl8821ae_bt_hw_init(struct ieee80211_hw *hw) { struct rtl_priv *rtlpriv = rtl_priv(hw); - if (rtlpriv->cfg->ops->get_btc_status()) - rtlpriv->btcoexist.btc_ops->btc_init_hw_config(rtlpriv); + rtl_btc(rtlpriv, rtlpriv->cfg->ops, btc_init_hw_config(rtlpriv)); } void rtl8821ae_suspend(struct ieee80211_hw *hw)