Export the function that other layers use for setting the led. Remove the function pointer and the macro to make the led control function configurable. This driver supports only a single configuration. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_led.c | 4 +--- drivers/staging/r8188eu/include/rtw_led.h | 12 ++---------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index 8223bddc490b..86c6c1a3b8bf 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -411,8 +411,6 @@ void rtl8188eu_InitSwLeds(struct adapter *padapter) struct led_priv *pledpriv = &padapter->ledpriv; struct LED_871x *pLed = &pledpriv->SwLed0; - pledpriv->LedControlHandler = LedControl8188eu; - pLed->padapter = padapter; ResetLedStatus(pLed); INIT_DELAYED_WORK(&pLed->blink_work, blink_work); @@ -428,7 +426,7 @@ void rtl8188eu_DeInitSwLeds(struct adapter *padapter) SwLedOff(padapter, pLed); } -void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction) +void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction) { struct led_priv *ledpriv = &padapter->ledpriv; struct registry_priv *registry_par; diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h index 2672ab165784..5c7b33e70732 100644 --- a/drivers/staging/r8188eu/include/rtw_led.h +++ b/drivers/staging/r8188eu/include/rtw_led.h @@ -60,22 +60,14 @@ struct LED_871x { struct delayed_work blink_work; }; -void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction); - struct led_priv{ struct LED_871x SwLed0; bool bRegUseLed; - void (*LedControlHandler)(struct adapter *padapter, - enum LED_CTL_MODE LedAction); }; -#define rtw_led_control(adapt, action) \ - do { \ - if ((adapt)->ledpriv.LedControlHandler) \ - (adapt)->ledpriv.LedControlHandler((adapt), (action)); \ - } while (0) - void rtl8188eu_InitSwLeds(struct adapter *padapter); void rtl8188eu_DeInitSwLeds(struct adapter *padapter); +void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction); + #endif /* __RTW_LED_H_ */ -- 2.30.2