staging: rtl8188eu: cleanup ODM_CmnInfoPtrArrayHook()

Convert single case switch to if statement to cleanup and
simplify code in ODM_CmnInfoPtrArrayHook().

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Straube 2019-01-31 09:55:30 +01:00 коммит произвёл Greg Kroah-Hartman
Родитель 5ccbce3a0b
Коммит da17ad1e6f
1 изменённых файлов: 1 добавлений и 10 удалений

Просмотреть файл

@ -209,17 +209,8 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm)
void ODM_CmnInfoPtrArrayHook(struct odm_dm_struct *pDM_Odm, enum odm_common_info_def CmnInfo, u16 Index, void *pValue)
{
/* Hook call by reference pointer. */
switch (CmnInfo) {
/* Dynamic call by reference pointer. */
case ODM_CMNINFO_STA_STATUS:
if (CmnInfo == ODM_CMNINFO_STA_STATUS)
pDM_Odm->pODM_StaInfo[Index] = (struct sta_info *)pValue;
break;
/* To remove the compiler warning, must add an empty default statement to handle the other values. */
default:
/* do nothing */
break;
}
}
void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm)