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>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 01/10] staging: r8188eu: bLedOpenDrain is always true for r8188eu
Date: Sun, 5 Dec 2021 16:12:42 +0100 [thread overview]
Message-ID: <20211205151251.6861-2-martin@kaiser.cx> (raw)
In-Reply-To: <20211205151251.6861-1-martin@kaiser.cx>
Remove the bLedOpenDrain variable and code that would be executed only
if bLedOpenDrain was false.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/hal/rtl8188eu_led.c | 16 +++++-----------
drivers/staging/r8188eu/hal/usb_halinit.c | 2 --
drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 --
3 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_led.c b/drivers/staging/r8188eu/hal/rtl8188eu_led.c
index 452d4bb87aba..2dd9b4518f13 100644
--- a/drivers/staging/r8188eu/hal/rtl8188eu_led.c
+++ b/drivers/staging/r8188eu/hal/rtl8188eu_led.c
@@ -36,7 +36,6 @@ void SwLedOn(struct adapter *padapter, struct LED_871x *pLed)
void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)
{
u8 LedCfg;
- struct hal_data_8188e *pHalData = GET_HAL_DATA(padapter);
if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
goto exit;
@@ -45,16 +44,11 @@ void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)
switch (pLed->LedPin) {
case LED_PIN_LED0:
- if (pHalData->bLedOpenDrain) {
- /* Open-drain arrangement for controlling the LED) */
- LedCfg &= 0x90; /* Set to software control. */
- rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT(3)));
- LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
- LedCfg &= 0xFE;
- rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
- } else {
- rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT(3) | BIT(5) | BIT(6)));
- }
+ LedCfg &= 0x90; /* Set to software control. */
+ rtw_write8(padapter, REG_LEDCFG2, (LedCfg | BIT(3)));
+ LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
+ LedCfg &= 0xFE;
+ rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
break;
case LED_PIN_LED1:
LedCfg &= 0x0f; /* Set to software control. */
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index e995904cf85c..b1372a349e47 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -942,10 +942,8 @@ unsigned int rtl8188eu_inirp_init(struct adapter *Adapter)
static void _ReadLEDSetting(struct adapter *Adapter, u8 *PROMContent, bool AutoloadFail)
{
struct led_priv *pledpriv = &Adapter->ledpriv;
- struct hal_data_8188e *haldata = GET_HAL_DATA(Adapter);
pledpriv->bRegUseLed = true;
- haldata->bLedOpenDrain = true;/* Support Open-drain arrangement for controlling the LED. */
}
static void Hal_EfuseParseMACAddr_8188EU(struct adapter *adapt, u8 *hwinfo, bool AutoLoadFail)
diff --git a/drivers/staging/r8188eu/include/rtl8188e_hal.h b/drivers/staging/r8188eu/include/rtl8188e_hal.h
index 0ebfcb732032..39dd547a033b 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_hal.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_hal.h
@@ -221,8 +221,6 @@ struct hal_data_8188e {
u32 AntennaRxPath; /* Antenna path Rx */
u8 ExternalPA;
- u8 bLedOpenDrain; /* Open-drain support for controlling the LED.*/
-
u8 b1x1RecvCombine; /* for 1T1R receive combining */
u32 AcParam_BE; /* Original parameter for BE, use for EDCA turbo. */
--
2.20.1
next prev parent reply other threads:[~2021-12-05 15:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-05 15:12 [PATCH 00/10] staging: r8188eu: some more cleanups Martin Kaiser
2021-12-05 15:12 ` Martin Kaiser [this message]
2021-12-05 15:12 ` [PATCH 02/10] staging: r8188eu: remove a bunch of unused led defines Martin Kaiser
2021-12-05 15:12 ` [PATCH 03/10] staging: r8188eu: remove two unused macros Martin Kaiser
2021-12-05 15:12 ` [PATCH 04/10] staging: r8188eu: bHWPowerdown is set but not used Martin Kaiser
2021-12-05 15:12 ` [PATCH 05/10] staging: r8188eu: remove unused macros from drv_types.h Martin Kaiser
2021-12-05 15:12 ` [PATCH 06/10] staging: r8188eu: hal data's interfaceIndex is never read Martin Kaiser
2021-12-05 15:12 ` [PATCH 07/10] staging: r8188eu: remove empty HAL_INIT_PROFILE_TAG macro Martin Kaiser
2021-12-05 15:12 ` [PATCH 08/10] staging: r8188eu: remove two write-only wifi direct variables Martin Kaiser
2021-12-05 15:12 ` [PATCH 09/10] staging: r8188eu: remove unused define Martin Kaiser
2021-12-05 15:12 ` [PATCH 10/10] staging: r8188eu: AntCombination is always 2 Martin Kaiser
2021-12-06 9:04 ` [PATCH 00/10] staging: r8188eu: some more cleanups Michael Straube
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=20211205151251.6861-2-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=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;
as well as URLs for NNTP newsgroup(s).