[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211226195556.159471-5-martin@kaiser.cx>
Date: Sun, 26 Dec 2021 20:55:39 +0100
From: Martin Kaiser <martin@...ser.cx>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Larry Finger <Larry.Finger@...inger.net>,
Phillip Potter <phil@...lpotter.co.uk>,
Michael Straube <straube.linux@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Martin Kaiser <martin@...ser.cx>
Subject: [PATCH 04/21] staging: r8188eu: merge InitLed871x and rtl8188eu_InitSwLeds
Copy InitLed871x into rtl8188eu_InitSwLeds. There's no need for two
separate functions.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
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
Powered by blists - more mailing lists