aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-01-10 13:46:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-01-25 16:18:42 +0100
commitb11ded5e8427127594965c877e84e4e63cf48c93 (patch)
tree64aafac38528eaa709d8f072bc4d06d591696dae /drivers
parentstaging: r8188eu: fix phy_RF6052_Config_ParaFile error handling (diff)
staging: r8188eu: remove a constant variable
The eRFPath variable in phy_RF6052_Config_ParaFile is always 0. Remove the variable and use 0 directly. (enum rf_radio_path)eRFPath can be replaced with RF_PATH_A, which is defined as 0. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220110124638.6909-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/r8188eu/hal/rtl8188e_rf6052.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
index 7e4744989a66..7474db05e8af 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_rf6052.c
@@ -374,12 +374,11 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
struct bb_reg_def *pPhyReg;
struct hal_data_8188e *pHalData = &Adapter->haldata;
u32 u4RegValue = 0;
- u8 eRFPath = 0;
int rtStatus = _SUCCESS;
/* Initialize RF */
- pPhyReg = &pHalData->PHYRegDef[eRFPath];
+ pPhyReg = &pHalData->PHYRegDef[0];
/*----Store original RFENV control type----*/
u4RegValue = rtl8188e_PHY_QueryBBReg(Adapter, pPhyReg->rfintfs, bRFSI_RFENV);
@@ -400,7 +399,7 @@ static int phy_RF6052_Config_ParaFile(struct adapter *Adapter)
udelay(1);/* PlatformStallExecution(1); */
/*----Initialize RF fom connfiguration file----*/
- if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, (enum rf_radio_path)eRFPath, (enum rf_radio_path)eRFPath))
+ if (HAL_STATUS_FAILURE == ODM_ConfigRFWithHeaderFile(&pHalData->odmpriv, RF_PATH_A, RF_PATH_A))
rtStatus = _FAIL;
/*----Restore RFENV control type----*/;