From: Michael Straube Date: Tue, 28 Dec 2021 10:11:20 +0000 (+0100) Subject: staging: r8188eu: merge _ReadLEDSetting() into ReadAdapterInfo8188EU() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=20a77667bbd7c28ec4f76c3c811dc22c65b4bee6;p=linux.git staging: r8188eu: merge _ReadLEDSetting() into ReadAdapterInfo8188EU() Function _ReadLEDSetting() sets only a single variable and the only user is ReadAdapterInfo8188EU(). Remove _ReadLEDSetting() and set the variable in ReadAdapterInfo8188EU() directly. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20211228101120.9120-11-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c index 293a616eabc62..d5c7e8bf1f38a 100644 --- a/drivers/staging/r8188eu/hal/usb_halinit.c +++ b/drivers/staging/r8188eu/hal/usb_halinit.c @@ -913,12 +913,6 @@ exit: /* EEPROM/EFUSE Content Parsing */ /* */ /* */ -static void _ReadLEDSetting(struct adapter *Adapter, u8 *PROMContent, bool AutoloadFail) -{ - struct led_priv *pledpriv = &Adapter->ledpriv; - - pledpriv->bRegUseLed = true; -} static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool AutoLoadFail) { @@ -938,6 +932,7 @@ static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool void ReadAdapterInfo8188EU(struct adapter *Adapter) { struct eeprom_priv *eeprom = &Adapter->eeprompriv; + struct led_priv *ledpriv = &Adapter->ledpriv; u8 eeValue; /* Read EEPROM size before call any EEPROM function */ @@ -965,7 +960,7 @@ void ReadAdapterInfo8188EU(struct adapter *Adapter) Hal_ReadAntennaDiversity88E(Adapter, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); Hal_ReadThermalMeter_88E(Adapter, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); - _ReadLEDSetting(Adapter, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); + ledpriv->bRegUseLed = true; } static void ResumeTxBeacon(struct adapter *adapt)