staging: r8188eu: switch the led off during deinit
authorMartin Kaiser <martin@kaiser.cx>
Sun, 26 Dec 2021 19:55:36 +0000 (20:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Dec 2021 16:12:33 +0000 (17:12 +0100)
When the driver is unloaded or when the system goes into standby mode,
DeInitLed871x is called to stop the led layer. In this case, we stop
the blinking worker but we do not switch the led off explicitly. On my
system, I can go into standby mode with the LED enabled.

Add a call to SwLedOff to fix this.

Fixes: 15865124feed ("staging: r8188eu: introduce new core dir for RTL8188eu driver")
Cc: stable@vger.kernel.org
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_led.c

index e1be1ba189cb47a03dce27285571487b3479bc60..25fab7bce7dca1a45eae5578504068d304f7af7f 100644 (file)
@@ -41,6 +41,7 @@ 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)