Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: r8188eu: remove LedPin from struct struct LED_871x

We only support a single LED. LedPin in struct struct LED_871x is
always LED_PIN_LED0. There's no need to store this info or to pass it
to functions as a parameter.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211207210537.23382-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Martin Kaiser and committed by
Greg Kroah-Hartman
673cd3f4 86b7e5fb

+3 -17
+1 -2
drivers/staging/r8188eu/core/rtw_led.c
··· 28 28 pLed->bLedScanBlinkInProgress = false; 29 29 } 30 30 31 - void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, enum LED_PIN_871x LedPin) 31 + void InitLed871x(struct adapter *padapter, struct LED_871x *pLed) 32 32 { 33 33 pLed->padapter = padapter; 34 - pLed->LedPin = LedPin; 35 34 36 35 ResetLedStatus(pLed); 37 36
+1 -6
drivers/staging/r8188eu/hal/rtl8188eu_led.c
··· 8 8 9 9 /* LED object. */ 10 10 11 - /* LED_819xUsb routines. */ 12 - /* Description: */ 13 - /* Turn on LED according to LedPin specified. */ 14 11 void SwLedOn(struct adapter *padapter, struct LED_871x *pLed) 15 12 { 16 13 u8 LedCfg; ··· 20 23 pLed->bLedOn = true; 21 24 } 22 25 23 - /* Description: */ 24 - /* Turn off LED according to LedPin specified. */ 25 26 void SwLedOff(struct adapter *padapter, struct LED_871x *pLed) 26 27 { 27 28 u8 LedCfg; ··· 49 54 50 55 pledpriv->LedControlHandler = LedControl8188eu; 51 56 52 - InitLed871x(padapter, &pledpriv->SwLed0, LED_PIN_LED0); 57 + InitLed871x(padapter, &pledpriv->SwLed0); 53 58 } 54 59 55 60 /* Description: */
+1 -9
drivers/staging/r8188eu/include/rtw_led.h
··· 51 51 LED_BLINK_ALWAYS_ON = 16, 52 52 }; 53 53 54 - enum LED_PIN_871x { 55 - LED_PIN_LED0 = 1, 56 - }; 57 - 58 54 struct LED_871x { 59 55 struct adapter *padapter; 60 56 61 - enum LED_PIN_871x LedPin; /* Identify how to implement this 62 - * SW led. */ 63 57 enum LED_STATE_871x CurrLedState; /* Current LED state. */ 64 58 enum LED_STATE_871x BlinkingLedState; /* Next state for blinking, 65 59 * either RTW_LED_ON or RTW_LED_OFF are. */ ··· 104 110 105 111 void ResetLedStatus(struct LED_871x * pLed); 106 112 107 - void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, 108 - enum LED_PIN_871x LedPin); 109 - 113 + void InitLed871x(struct adapter *padapter, struct LED_871x *pLed); 110 114 void DeInitLed871x(struct LED_871x *pLed); 111 115 112 116 /* hal... */