mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 13:27:06 +09:00
staging: r8188eu: merge Efuse_ReadAllMap into EFUSE_ShadowMapUpdate
Efuse_ReadAllMap is small, it's called only by EFUSE_ShadowMapUpdate. This patch merges the two functions. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211113185518.23941-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
304c825316
commit
a15aed6633
@@ -215,35 +215,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Function: Efuse_ReadAllMap
|
||||
*
|
||||
* Overview: Read All Efuse content
|
||||
*
|
||||
* Input: NONE
|
||||
*
|
||||
* Output: NONE
|
||||
*
|
||||
* Return: NONE
|
||||
*
|
||||
* Revised History:
|
||||
* When Who Remark
|
||||
* 11/11/2008 MHC Create Version 0.
|
||||
*
|
||||
*---------------------------------------------------------------------------*/
|
||||
static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 *Efuse)
|
||||
{
|
||||
u16 mapLen = 0;
|
||||
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, true);
|
||||
|
||||
rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
|
||||
|
||||
rtl8188e_ReadEFuse(pAdapter, 0, mapLen, Efuse);
|
||||
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, false);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Function: EFUSE_ShadowMapUpdate
|
||||
*
|
||||
@@ -267,8 +238,13 @@ void EFUSE_ShadowMapUpdate(struct adapter *pAdapter)
|
||||
|
||||
rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
|
||||
|
||||
if (pEEPROM->bautoload_fail_flag)
|
||||
if (pEEPROM->bautoload_fail_flag) {
|
||||
memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
|
||||
else
|
||||
Efuse_ReadAllMap(pAdapter, pEEPROM->efuse_eeprom_data);
|
||||
} /* EFUSE_ShadowMapUpdate */
|
||||
return;
|
||||
}
|
||||
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, true);
|
||||
rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
|
||||
rtl8188e_ReadEFuse(pAdapter, 0, mapLen, pEEPROM->efuse_eeprom_data);
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user