[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211226195556.159471-6-martin@kaiser.cx>
Date: Sun, 26 Dec 2021 20:55:40 +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 05/21] staging: r8188eu: merge DeInitLed871x and rtl8188eu_DeInitSwLeds
Merge DeInitLed871x and rtl8188eu_DeInitSwLeds, both of which are
small and simple.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
drivers/staging/r8188eu/core/rtw_led.c | 12 ++++--------
drivers/staging/r8188eu/include/rtw_led.h | 2 --
2 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index 541aba6faaf0..1eb70f33c158 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -59,13 +59,6 @@ static void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)
pLed->bLedOn = false;
}
-void DeInitLed871x(struct LED_871x *pLed)
-{
- cancel_delayed_work_sync(&pLed->blink_work);
- ResetLedStatus(pLed);
- SwLedOff(pLed->padapter, pLed);
-}
-
static void SwLedBlink1(struct LED_871x *pLed)
{
struct adapter *padapter = pLed->padapter;
@@ -423,8 +416,11 @@ void rtl8188eu_InitSwLeds(struct adapter *padapter)
void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
{
struct led_priv *ledpriv = &padapter->ledpriv;
+ struct LED_871x *pLed = &ledpriv->SwLed0;
- DeInitLed871x(&ledpriv->SwLed0);
+ cancel_delayed_work_sync(&pLed->blink_work);
+ ResetLedStatus(pLed);
+ SwLedOff(padapter, pLed);
}
void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h
index 2c4dc361e469..ed8574c88288 100644
--- a/drivers/staging/r8188eu/include/rtw_led.h
+++ b/drivers/staging/r8188eu/include/rtw_led.h
@@ -104,8 +104,6 @@ void BlinkWorkItemCallback(struct work_struct *work);
void ResetLedStatus(struct LED_871x * pLed);
-void DeInitLed871x(struct LED_871x *pLed);
-
void rtl8188eu_InitSwLeds(struct adapter *padapter);
void rtl8188eu_DeInitSwLeds(struct adapter *padapter);
--
2.30.2
Powered by blists - more mailing lists