Copy InitLed871x into rtl8188eu_InitSwLeds. There's no need for two separate functions. Signed-off-by: Martin Kaiser <martin@xxxxxxxxx> --- drivers/staging/r8188eu/core/rtw_led.c | 14 ++++---------- drivers/staging/r8188eu/include/rtw_led.h | 1 - 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c index 50dabc3d2e29..541aba6faaf0 100644 --- a/drivers/staging/r8188eu/core/rtw_led.c +++ b/drivers/staging/r8188eu/core/rtw_led.c @@ -59,15 +59,6 @@ static void SwLedOff(struct adapter *padapter, struct LED_871x *pLed) pLed->bLedOn = false; } -void InitLed871x(struct adapter *padapter, struct LED_871x *pLed) -{ - pLed->padapter = padapter; - - ResetLedStatus(pLed); - - INIT_DELAYED_WORK(&pLed->blink_work, BlinkWorkItemCallback); -} - void DeInitLed871x(struct LED_871x *pLed) { cancel_delayed_work_sync(&pLed->blink_work); @@ -420,10 +411,13 @@ void BlinkHandler(struct LED_871x *pLed) void rtl8188eu_InitSwLeds(struct adapter *padapter) { struct led_priv *pledpriv = &padapter->ledpriv; + struct LED_871x *pLed = &pledpriv->SwLed0; pledpriv->LedControlHandler = LedControl8188eu; - InitLed871x(padapter, &pledpriv->SwLed0); + pLed->padapter = padapter; + ResetLedStatus(pLed); + INIT_DELAYED_WORK(&pLed->blink_work, BlinkWorkItemCallback); } void rtl8188eu_DeInitSwLeds(struct adapter *padapter) diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h index d4ba5ac3e48a..2c4dc361e469 100644 --- a/drivers/staging/r8188eu/include/rtw_led.h +++ b/drivers/staging/r8188eu/include/rtw_led.h @@ -104,7 +104,6 @@ void BlinkWorkItemCallback(struct work_struct *work); void ResetLedStatus(struct LED_871x * pLed); -void InitLed871x(struct adapter *padapter, struct LED_871x *pLed); void DeInitLed871x(struct LED_871x *pLed); void rtl8188eu_InitSwLeds(struct adapter *padapter); -- 2.30.2