lkml.org 
[lkml]   [2021]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 01/10] staging: rtl8188eu: merge two functions
Date
All that rtw_hal_read_chip_info does is call _ReadPROMContent. Merge the
two functions.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/rtl8188eu/hal/usb_halinit.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c
index 05c67e7d23ad..56de6071eb72 100644
--- a/drivers/staging/rtl8188eu/hal/usb_halinit.c
+++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c
@@ -990,25 +990,18 @@ static void readAdapterInfo_8188EU(struct adapter *adapt)
Hal_ReadThermalMeter_88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);
}

-static void _ReadPROMContent(struct adapter *Adapter)
+void rtw_hal_read_chip_info(struct adapter *Adapter)
{
struct eeprom_priv *eeprom = GET_EEPROM_EFUSE_PRIV(Adapter);
- u8 eeValue;
+ u8 eeValue = usb_read8(Adapter, REG_9346CR);

- /* check system boot selection */
- eeValue = usb_read8(Adapter, REG_9346CR);
- eeprom->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
- eeprom->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;
+ eeprom->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
+ eeprom->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;

Hal_InitPGData88E(Adapter);
readAdapterInfo_8188EU(Adapter);
}

-void rtw_hal_read_chip_info(struct adapter *Adapter)
-{
- _ReadPROMContent(Adapter);
-}
-
#define GPIO_DEBUG_PORT_NUM 0
static void rtl8192cu_trigger_gpio_0(struct adapter *adapt)
{
--
2.20.1
\
 
 \ /
  Last update: 2021-07-18 19:38    [W:2.482 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site