staging: r8188eu: remove BlinkingLedState
authorMartin Kaiser <martin@kaiser.cx>
Sun, 18 Sep 2022 17:56:58 +0000 (19:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2022 11:09:18 +0000 (13:09 +0200)
commitbf0d687586f62db4f7000456c63a45c23b08bbb2
tree0fbaf7cbe0a274bad21a054c2e638baab0b77f88
parent64c82a8888a658c117e398af83446e28c1d58114
staging: r8188eu: remove BlinkingLedState

Both bLedOn and BlinkingLedState in struct led_priv store the same
information.

The boolean bLedOn stores the curent led state while BlinkingLedState
stores the next led state to be set during blinking, which is the inverse
of the current led state. (The led is either off or blinking, it's never
continuously on.)

This patch removes BlinkingLedState and uses bLedOn instead.

The LED_BLINK_WPS_STOP case in blink_work checked for
pLed->BlinkingLedState != RTW_LED_ON. This is true if the next led
blinking state is ON, i.e. if the led has just been switched off by
blink_work, i.e. if (!pLed->bLedOn).

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220918175700.215170-5-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