mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
staging: r8188eu: remove write support from rtl8188e_EfusePowerSwitch
The rtl8188e_EfusePowerSwitch function has a write parameter that is set to false by its callers. Remove the parameter and resulting dead code. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211107161624.9452-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1a7b609415
commit
7e90e57307
|
|
@ -241,13 +241,13 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse,
|
|||
{
|
||||
u16 mapLen = 0;
|
||||
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, false, true);
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, true);
|
||||
|
||||
rtl8188e_EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
|
||||
|
||||
rtl8188e_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
|
||||
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, false, false);
|
||||
rtl8188e_EfusePowerSwitch(pAdapter, false);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -673,9 +673,8 @@ hal_EfusePgPacketWriteData(
|
|||
struct pgpkt *pTargetPkt,
|
||||
bool bPseudoTest);
|
||||
|
||||
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)
|
||||
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 PwrState)
|
||||
{
|
||||
u8 tempval;
|
||||
u16 tmpV16;
|
||||
|
||||
if (PwrState) {
|
||||
|
|
@ -700,22 +699,8 @@ void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState)
|
|||
tmpV16 |= (LOADER_CLK_EN | ANA8M);
|
||||
rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16);
|
||||
}
|
||||
|
||||
if (bWrite) {
|
||||
/* Enable LDO 2.5V before read/write action */
|
||||
tempval = rtw_read8(pAdapter, EFUSE_TEST + 3);
|
||||
tempval &= 0x0F;
|
||||
tempval |= (VOLTAGE_V25 << 4);
|
||||
rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval | 0x80));
|
||||
}
|
||||
} else {
|
||||
rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
|
||||
|
||||
if (bWrite) {
|
||||
/* Disable LDO 2.5V after read/write action */
|
||||
tempval = rtw_read8(pAdapter, EFUSE_TEST + 3);
|
||||
rtw_write8(pAdapter, EFUSE_TEST + 3, (tempval & 0x7F));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ void rtl8188e_SetHalODMVar(struct adapter *Adapter,
|
|||
enum hal_odm_variable eVariable, void *pValue1, bool bSet);
|
||||
u32 rtl8188eu_InitPowerOn(struct adapter *adapt);
|
||||
void rtl8188e_free_hal_data(struct adapter *padapter);
|
||||
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 bWrite, u8 PwrState);
|
||||
void rtl8188e_EfusePowerSwitch(struct adapter *pAdapter, u8 PwrState);
|
||||
void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
|
||||
u16 _offset, u16 _size_byte, u8 *pbuf,
|
||||
bool bPseudoTest);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user