mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 13:33:30 -04:00
staging: r8188eu: clean up the blink worker code
Merge the BlinkWorkItemCallback and BlinkHandler functions. Rename the resulting function to blink_work and make it internal to the led layer. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20211226195556.159471-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c87adbe4bf
commit
98731fa612
@@ -5,13 +5,6 @@
|
||||
#include "../include/rtw_led.h"
|
||||
#include "../include/rtl8188e_spec.h"
|
||||
|
||||
void BlinkWorkItemCallback(struct work_struct *work)
|
||||
{
|
||||
struct delayed_work *dwork = to_delayed_work(work);
|
||||
struct LED_871x *pLed = container_of(dwork, struct LED_871x, blink_work);
|
||||
BlinkHandler(pLed);
|
||||
}
|
||||
|
||||
static void ResetLedStatus(struct LED_871x *pLed)
|
||||
{
|
||||
pLed->CurrLedState = RTW_LED_OFF; /* Current LED state. */
|
||||
@@ -391,8 +384,10 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
|
||||
}
|
||||
}
|
||||
|
||||
void BlinkHandler(struct LED_871x *pLed)
|
||||
static void blink_work(struct work_struct *work)
|
||||
{
|
||||
struct delayed_work *dwork = to_delayed_work(work);
|
||||
struct LED_871x *pLed = container_of(dwork, struct LED_871x, blink_work);
|
||||
struct adapter *padapter = pLed->padapter;
|
||||
|
||||
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
|
||||
@@ -410,7 +405,7 @@ void rtl8188eu_InitSwLeds(struct adapter *padapter)
|
||||
|
||||
pLed->padapter = padapter;
|
||||
ResetLedStatus(pLed);
|
||||
INIT_DELAYED_WORK(&pLed->blink_work, BlinkWorkItemCallback);
|
||||
INIT_DELAYED_WORK(&pLed->blink_work, blink_work);
|
||||
}
|
||||
|
||||
void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
|
||||
|
||||
@@ -100,11 +100,7 @@ struct led_priv{
|
||||
(adapt)->ledpriv.LedControlHandler((adapt), (action)); \
|
||||
} while (0)
|
||||
|
||||
void BlinkWorkItemCallback(struct work_struct *work);
|
||||
|
||||
void rtl8188eu_InitSwLeds(struct adapter *padapter);
|
||||
void rtl8188eu_DeInitSwLeds(struct adapter *padapter);
|
||||
|
||||
void BlinkHandler(struct LED_871x * pLed);
|
||||
|
||||
#endif /* __RTW_LED_H_ */
|
||||
|
||||
Reference in New Issue
Block a user