[PATCH 05/47] staging: r8188eu: remove rtw_efuse_access()
From: Michael Straube
Date: Wed Sep 22 2021 - 16:05:40 EST
Function rtw_efuse_access() is not used, remove it. It is the only
user of the functions efuse_{read,write}8, remove these as well.
Signed-off-by: Michael Straube <straube.linux@xxxxxxxxx>
---
drivers/staging/r8188eu/core/rtw_efuse.c | 53 ---------------------
drivers/staging/r8188eu/include/rtw_efuse.h | 2 -
2 files changed, 55 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_efuse.c b/drivers/staging/r8188eu/core/rtw_efuse.c
index 010740d035ea..893287e50d9c 100644
--- a/drivers/staging/r8188eu/core/rtw_efuse.c
+++ b/drivers/staging/r8188eu/core/rtw_efuse.c
@@ -226,59 +226,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
}
}
-static u8 efuse_read8(struct adapter *padapter, u16 address, u8 *value)
-{
- return efuse_OneByteRead(padapter, address, value, false);
-}
-
-static u8 efuse_write8(struct adapter *padapter, u16 address, u8 *value)
-{
- return efuse_OneByteWrite(padapter, address, *value, false);
-}
-
-/*
- * read/wirte raw efuse data
- */
-u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts, u8 *data)
-{
- int i = 0;
- u16 real_content_len = 0, max_available_size = 0;
- u8 res = _FAIL;
- u8 (*rw8)(struct adapter *, u16, u8*);
-
- rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
- rtl8188e_EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
-
- if (start_addr > real_content_len)
- return _FAIL;
-
- if (write) {
- if ((start_addr + cnts) > max_available_size)
- return _FAIL;
- rw8 = &efuse_write8;
- } else {
- rw8 = &efuse_read8;
- }
-
- rtl8188e_EfusePowerSwitch(padapter, write, true);
-
- /* e-fuse one byte read / write */
- for (i = 0; i < cnts; i++) {
- if (start_addr >= real_content_len) {
- res = _FAIL;
- break;
- }
-
- res = rw8(padapter, start_addr++, data++);
- if (_FAIL == res)
- break;
- }
-
- rtl8188e_EfusePowerSwitch(padapter, write, false);
-
- return res;
-}
-
u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
{
u16 mapLen = 0;
diff --git a/drivers/staging/r8188eu/include/rtw_efuse.h b/drivers/staging/r8188eu/include/rtw_efuse.h
index 02cbadb2ec2b..f0236a89d731 100644
--- a/drivers/staging/r8188eu/include/rtw_efuse.h
+++ b/drivers/staging/r8188eu/include/rtw_efuse.h
@@ -101,8 +101,6 @@ extern u8 fakeBTEfuseInitMap[];
extern u8 fakeBTEfuseModifiedMap[];
/*------------------------Export global variable----------------------------*/
-u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
- u16 cnts, u8 *data);
u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
--
2.33.0