Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S944780AbcJSPU5 (ORCPT ); Wed, 19 Oct 2016 11:20:57 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34403 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S944138AbcJSPGB (ORCPT ); Wed, 19 Oct 2016 11:06:01 -0400 From: Ivan Safonov To: Greg Kroah-Hartman , Bhaktipriya Shridhar , Andy Shevchenko , Geliang Tang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: insafonov@gmail.com Subject: [PATCH 08/37] staging:r8188eu: refactor path_adda_on function Date: Wed, 19 Oct 2016 22:07:36 +0700 Message-Id: <1476889685-7367-8-git-send-email-insafonov@gmail.com> X-Mailer: git-send-email 2.7.3 In-Reply-To: <1476889685-7367-1-git-send-email-insafonov@gmail.com> References: <1476889685-7367-1-git-send-email-insafonov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1562 Lines: 46 Remove is_path_a_on and is2t arguments. These argument always are constant. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/phy.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c index 6c6becf..6b70d09 100644 --- a/drivers/staging/rtl8188eu/hal/phy.c +++ b/drivers/staging/rtl8188eu/hal/phy.c @@ -774,19 +774,13 @@ static void reload_mac_registers(struct adapter *adapt, usb_write32(adapt, mac_reg[i], backup[i]); } -static void path_adda_on(struct adapter *adapt, u32 *adda_reg, - bool is_path_a_on, bool is2t) +static void path_adda_on(struct adapter *adapt, u32 *adda_reg) { u32 path_on; u32 i; - if (!is2t) { - path_on = 0x0bdb25a0; - phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, 0x0b1b25a0); - } else { - path_on = is_path_a_on ? 0x04db25a4 : 0x0b1b25a4; - phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, path_on); - } + path_on = 0x0bdb25a0; + phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, 0x0b1b25a0); for (i = 1; i < IQK_ADDA_REG_NUM; i++) phy_set_bb_reg(adapt, adda_reg[i], bMaskDWord, path_on); @@ -924,7 +918,7 @@ static void phy_iq_calibrate(struct adapter *adapt, s32 result[][8], u8 t) dm_odm->RFCalibrateInfo.IQK_BB_backup, IQK_BB_REG_NUM); } - path_adda_on(adapt, adda_reg, true, 0); + path_adda_on(adapt, adda_reg); if (t == 0) dm_odm->RFCalibrateInfo.bRfPiEnable = (u8)phy_query_bb_reg(adapt, rFPGA0_XA_HSSIParameter1, BIT(8)); -- 2.7.3