staging: r8188eu: merge DeInitLed871x and rtl8188eu_DeInitSwLeds
authorMartin Kaiser <martin@kaiser.cx>
Sun, 26 Dec 2021 19:55:40 +0000 (20:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Dec 2021 16:12:34 +0000 (17:12 +0100)
Merge DeInitLed871x and rtl8188eu_DeInitSwLeds, both of which are
small and simple.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_led.c
drivers/staging/r8188eu/include/rtw_led.h

index 541aba6..1eb70f3 100644 (file)
@@ -59,13 +59,6 @@ exit:
        pLed->bLedOn = false;
 }
 
-void DeInitLed871x(struct LED_871x *pLed)
-{
-       cancel_delayed_work_sync(&pLed->blink_work);
-       ResetLedStatus(pLed);
-       SwLedOff(pLed->padapter, pLed);
-}
-
 static void SwLedBlink1(struct LED_871x *pLed)
 {
        struct adapter *padapter = pLed->padapter;
@@ -423,8 +416,11 @@ void rtl8188eu_InitSwLeds(struct adapter *padapter)
 void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
 {
        struct led_priv *ledpriv = &padapter->ledpriv;
+       struct LED_871x *pLed = &ledpriv->SwLed0;
 
-       DeInitLed871x(&ledpriv->SwLed0);
+       cancel_delayed_work_sync(&pLed->blink_work);
+       ResetLedStatus(pLed);
+       SwLedOff(padapter, pLed);
 }
 
 void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
index 2c4dc36..ed8574c 100644 (file)
@@ -104,8 +104,6 @@ void BlinkWorkItemCallback(struct work_struct *work);
 
 void ResetLedStatus(struct LED_871x * pLed);
 
-void DeInitLed871x(struct LED_871x *pLed);
-
 void rtl8188eu_InitSwLeds(struct adapter *padapter);
 void rtl8188eu_DeInitSwLeds(struct adapter *padapter);