linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] staging: rtl8188eu: merge two functions
@ 2021-07-18 17:36 Martin Kaiser
  2021-07-18 17:36 ` [PATCH 02/10] staging: rtl8188eu: remove the "trigger gpio 0" hal variable Martin Kaiser
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Martin Kaiser @ 2021-07-18 17:36 UTC (permalink / raw)
  To: Larry Finger, Greg Kroah-Hartman
  Cc: linux-staging, kernel-janitors, linux-kernel, Martin Kaiser

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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-18 17:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-18 17:36 [PATCH 01/10] staging: rtl8188eu: merge two functions Martin Kaiser
2021-07-18 17:36 ` [PATCH 02/10] staging: rtl8188eu: remove the "trigger gpio 0" hal variable Martin Kaiser
2021-07-18 17:36 ` [PATCH 03/10] staging: rtl8188eu: remove RTL871X_HCI_TYPE enum Martin Kaiser
2021-07-18 17:36 ` [PATCH 04/10] staging: rtl8188eu: remove _CHIP_TYPE enum Martin Kaiser
2021-07-18 17:36 ` [PATCH 05/10] staging: rtl8188eu: remove struct eeprom_priv's EepromOrEfuse Martin Kaiser
2021-07-18 17:36 ` [PATCH 06/10] staging: rtl8188eu: remove efuse write support Martin Kaiser
2021-07-18 17:36 ` [PATCH 07/10] staging: rtl8188eu: remove unused power flows and transitions Martin Kaiser
2021-07-18 17:36 ` [PATCH 08/10] staging: rtl8188eu: remove constant function parameter Martin Kaiser
2021-07-18 17:36 ` [PATCH 09/10] staging: rtl8188eu: remove PWR_CMD_READ Martin Kaiser
2021-07-18 17:36 ` [PATCH 10/10] staging: rtl8188eu: remove cut_mask field from wl_pwr_cfg Martin Kaiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).