[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221015151115.232095-5-martin@kaiser.cx>
Date: Sat, 15 Oct 2022 17:11:09 +0200
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>,
Pavel Skripkin <paskripkin@...il.com>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org,
Martin Kaiser <martin@...ser.cx>
Subject: [PATCH 04/10] staging: r8188eu: SwLedOn needs no padapter parameter
Remove the padapter parameter from the SwLedOn function. padapter can be
derived from the pLed parameter.
Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
drivers/staging/r8188eu/core/rtw_led.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index 38433296d327..aa8f41edfade 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -29,8 +29,10 @@ static void ResetLedStatus(struct led_priv *pLed)
pLed->bLedScanBlinkInProgress = false;
}
-static void SwLedOn(struct adapter *padapter, struct led_priv *pLed)
+static void SwLedOn(struct led_priv *pLed)
{
+ struct adapter *padapter = container_of(pLed, struct adapter, ledpriv);
+
if (padapter->bDriverStopped)
return;
@@ -67,7 +69,7 @@ static void blink_work(struct work_struct *work)
if (pLed->bLedOn)
SwLedOff(padapter, pLed);
else
- SwLedOn(padapter, pLed);
+ SwLedOn(pLed);
switch (pLed->CurrLedState) {
case LED_BLINK_SLOWLY:
--
2.30.2
Powered by blists - more mailing lists