rtl8188e_init_dm_priv is the only caller of Init_ODM_ComInfo_88E. Merge the two functions. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/hal/rtl8188e_dm.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c index 558aa85f1a9f..a05d8687c18d 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c @@ -22,21 +22,6 @@ static void dm_InitGPIOSetting(struct adapter *Adapter) /* */ /* functions */ /* */ -static void Init_ODM_ComInfo_88E(struct adapter *Adapter) -{ - struct hal_data_8188e *hal_data = &Adapter->haldata; - struct odm_dm_struct *dm_odm = &hal_data->odmpriv; - - /* Init Value */ - memset(dm_odm, 0, sizeof(*dm_odm)); - - dm_odm->Adapter = Adapter; - - ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(hal_data->VersionID)); - - ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_RF_ANTENNA_TYPE, hal_data->TRxAntDivType); -} - static void Update_ODM_ComInfo_88E(struct adapter *Adapter) { struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv; @@ -102,9 +87,14 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter) { struct hal_data_8188e *hal_data = &Adapter->haldata; struct dm_priv *pdmpriv = &hal_data->dmpriv; + struct odm_dm_struct *dm_odm = &hal_data->odmpriv; memset(pdmpriv, 0, sizeof(struct dm_priv)); - Init_ODM_ComInfo_88E(Adapter); + memset(dm_odm, 0, sizeof(*dm_odm)); + + dm_odm->Adapter = Adapter; + ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_MP_TEST_CHIP, IS_NORMAL_CHIP(hal_data->VersionID)); + ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_RF_ANTENNA_TYPE, hal_data->TRxAntDivType); } /* Add new function to reset the state of antenna diversity before link. */ -- 2.30.2