This is just a wrapper that calls rtw_read8. Remove the wrapper and call rtw_read8 directly. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/hal/HalPhyRf_8188e.c | 8 ++++---- drivers/staging/r8188eu/hal/odm_interface.c | 6 ------ drivers/staging/r8188eu/include/odm_interface.h | 2 -- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c index 60d4ba275196..6a7e2d60dfbf 100644 --- a/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c +++ b/drivers/staging/r8188eu/hal/HalPhyRf_8188e.c @@ -603,9 +603,9 @@ static void _PHY_SaveMACRegisters( u32 i; struct hal_data_8188e *pHalData = GET_HAL_DATA(adapt); struct odm_dm_struct *dm_odm = &pHalData->odmpriv; - for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) { - MACBackup[i] = ODM_Read1Byte(dm_odm, MACReg[i]); - } + for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) + MACBackup[i] = rtw_read8(adapt, MACReg[i]); + MACBackup[i] = ODM_Read4Byte(dm_odm, MACReg[i]); } @@ -938,7 +938,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t) struct odm_dm_struct *dm_odm = &pHalData->odmpriv; /* Check continuous TX and Packet TX */ - tmpreg = ODM_Read1Byte(dm_odm, 0xd03); + tmpreg = rtw_read8(adapt, 0xd03); if ((tmpreg & 0x70) != 0) /* Deal with contisuous TX case */ ODM_Write1Byte(dm_odm, 0xd03, tmpreg & 0x8F); /* disable all continuous TX */ diff --git a/drivers/staging/r8188eu/hal/odm_interface.c b/drivers/staging/r8188eu/hal/odm_interface.c index 7ddba39a0f4b..e44e24c2a86e 100644 --- a/drivers/staging/r8188eu/hal/odm_interface.c +++ b/drivers/staging/r8188eu/hal/odm_interface.c @@ -4,12 +4,6 @@ #include "../include/odm_precomp.h" /* ODM IO Relative API. */ -u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr) -{ - struct adapter *Adapter = pDM_Odm->Adapter; - return rtw_read8(Adapter, RegAddr); -} - u32 ODM_Read4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr) { struct adapter *Adapter = pDM_Odm->Adapter; diff --git a/drivers/staging/r8188eu/include/odm_interface.h b/drivers/staging/r8188eu/include/odm_interface.h index 17a315d19a50..6e9a7d5860d8 100644 --- a/drivers/staging/r8188eu/include/odm_interface.h +++ b/drivers/staging/r8188eu/include/odm_interface.h @@ -19,8 +19,6 @@ typedef void (*RT_WORKITEM_CALL_BACK)(void *pContext); /* =========== EXtern Function Prototype */ -u8 ODM_Read1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr); - u32 ODM_Read4Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr); void ODM_Write1Byte(struct odm_dm_struct *pDM_Odm, u32 RegAddr, u8 Data); -- 2.20.1