diff options
author | Martin Kaiser <martin@kaiser.cx> | 2021-07-18 19:36:01 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-21 10:31:22 +0200 |
commit | d2785a198b7c484f8e36ad2fd147c2a7ba243922 (patch) | |
tree | 1e28e0ca821c949addf964c4223ca2e337bcbbcf | |
parent | 552fd002bdb520af3a8bedf1ee36185cf5e2c52f (diff) | |
download | linux-stable-d2785a198b7c484f8e36ad2fd147c2a7ba243922.tar.gz linux-stable-d2785a198b7c484f8e36ad2fd147c2a7ba243922.tar.bz2 linux-stable-d2785a198b7c484f8e36ad2fd147c2a7ba243922.zip |
staging: rtl8188eu: merge two functions
All that rtw_hal_read_chip_info does is call _ReadPROMContent. Merge the
two functions.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210718173610.894-1-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8188eu/hal/usb_halinit.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 2a47e9b444d5..3c9a2c99c0d4 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) { |