mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 14:42:34 -04:00
staging: r8188eu: clean up blinking macros
Clean up the macros that check the blinking mode of a LED. The macro IS_LED_BLINKING is not used and can be removed. The IS_LED_WPS_BLINKING macro is used only by rtw_led.c. Move the macro into this file. The macro parameter is always a struct LED_871x *, there's no need for a cast. Rename the parameter to l and put it in parentheses, which is good practice for macro parameters. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211226195556.159471-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
98731fa612
commit
0a7a87c418
@@ -5,6 +5,11 @@
|
||||
#include "../include/rtw_led.h"
|
||||
#include "../include/rtl8188e_spec.h"
|
||||
|
||||
#define IS_LED_WPS_BLINKING(l) \
|
||||
((l)->CurrLedState == LED_BLINK_WPS || \
|
||||
(l)->CurrLedState == LED_BLINK_WPS_STOP || \
|
||||
(l)->bLedWPSBlinkInProgress)
|
||||
|
||||
static void ResetLedStatus(struct LED_871x *pLed)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_OFF; /* Current LED state. */
|
||||
|
||||
@@ -74,15 +74,6 @@ struct LED_871x {
|
||||
struct delayed_work blink_work;
|
||||
};
|
||||
|
||||
#define IS_LED_WPS_BLINKING(_LED_871x) \
|
||||
(((struct LED_871x *)_LED_871x)->CurrLedState == LED_BLINK_WPS || \
|
||||
((struct LED_871x *)_LED_871x)->CurrLedState == LED_BLINK_WPS_STOP || \
|
||||
((struct LED_871x *)_LED_871x)->bLedWPSBlinkInProgress)
|
||||
|
||||
#define IS_LED_BLINKING(_LED_871x) \
|
||||
(((struct LED_871x *)_LED_871x)->bLedWPSBlinkInProgress || \
|
||||
((struct LED_871x *)_LED_871x)->bLedScanBlinkInProgress)
|
||||
|
||||
void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction);
|
||||
|
||||
struct led_priv{
|
||||
|
||||
Reference in New Issue
Block a user