From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 04/10] staging: r8188eu: SwLedOn needs no padapter parameter
Date: Sat, 15 Oct 2022 17:11:09 +0200 [thread overview]
Message-ID: <20221015151115.232095-5-martin@kaiser.cx> (raw)
In-Reply-To: <20221015151115.232095-1-martin@kaiser.cx>
Remove the padapter parameter from the SwLedOn function. padapter can be
derived from the pLed parameter.
Signed-off-by: Martin Kaiser <martin@kaiser.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
next prev parent reply other threads:[~2022-10-15 15:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-15 15:11 [PATCH 00/10] staging: r8188eu: led layer fix and cleanups Martin Kaiser
2022-10-15 15:11 ` [PATCH 01/10] staging: r8188eu: fix led register settings Martin Kaiser
2022-10-16 9:13 ` Michael Straube
2022-10-16 16:22 ` Martin Kaiser
2022-10-15 15:11 ` [PATCH 02/10] staging: r8188eu: handle rtw_write8 errors in SwLedOn Martin Kaiser
2022-10-15 15:11 ` [PATCH 03/10] staging: r8188eu: fix status updates in SwLedOff Martin Kaiser
2022-10-15 15:42 ` Pavel Skripkin
2022-10-16 16:21 ` Martin Kaiser
2022-10-15 15:11 ` Martin Kaiser [this message]
2022-10-15 15:11 ` [PATCH 05/10] staging: r8188eu: SwLedOff needs no padapter parameter Martin Kaiser
2022-10-15 15:11 ` [PATCH 06/10] staging: r8188eu: remove two unused defines Martin Kaiser
2022-10-15 15:11 ` [PATCH 07/10] staging: r8188eu: don't include rtw_led.h from rtw_cmd.h Martin Kaiser
2022-10-15 15:11 ` [PATCH 08/10] staging: r8188eu: remove padapter from struct led_priv Martin Kaiser
2022-10-15 15:11 ` [PATCH 09/10] staging: r8188eu: set two more state variables Martin Kaiser
2022-10-15 15:11 ` [PATCH 10/10] staging: r8188eu: summarize tx/rx and scan blinking Martin Kaiser
2022-10-15 20:22 ` Philipp Hortmann
2022-10-16 16:07 ` Martin Kaiser
2022-10-16 18:45 ` [PATCH 00/10] staging: r8188eu: led layer fix and cleanups Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221015151115.232095-5-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®