lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211226195556.159471-15-martin@kaiser.cx>
Date:   Sun, 26 Dec 2021 20:55:49 +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 14/21] staging: r8188eu: remove LedControlHandler

Export the function that other layers use for setting the led.

Remove the function pointer and the macro to make the led control function
configurable. This driver supports only a single configuration.

Signed-off-by: Martin Kaiser <martin@...ser.cx>
---
 drivers/staging/r8188eu/core/rtw_led.c    |  4 +---
 drivers/staging/r8188eu/include/rtw_led.h | 12 ++----------
 2 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index 8223bddc490b..86c6c1a3b8bf 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -411,8 +411,6 @@ void rtl8188eu_InitSwLeds(struct adapter *padapter)
 	struct led_priv *pledpriv = &padapter->ledpriv;
 	struct LED_871x *pLed = &pledpriv->SwLed0;
 
-	pledpriv->LedControlHandler = LedControl8188eu;
-
 	pLed->padapter = padapter;
 	ResetLedStatus(pLed);
 	INIT_DELAYED_WORK(&pLed->blink_work, blink_work);
@@ -428,7 +426,7 @@ void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
 	SwLedOff(padapter, pLed);
 }
 
-void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
+void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction)
 {
 	struct led_priv *ledpriv = &padapter->ledpriv;
 	struct registry_priv *registry_par;
diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h
index 2672ab165784..5c7b33e70732 100644
--- a/drivers/staging/r8188eu/include/rtw_led.h
+++ b/drivers/staging/r8188eu/include/rtw_led.h
@@ -60,22 +60,14 @@ struct LED_871x {
 	struct delayed_work blink_work;
 };
 
-void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE	LedAction);
-
 struct led_priv{
 	struct LED_871x			SwLed0;
 	bool	bRegUseLed;
-	void (*LedControlHandler)(struct adapter *padapter,
-				  enum LED_CTL_MODE LedAction);
 };
 
-#define rtw_led_control(adapt, action) \
-	do { \
-		if ((adapt)->ledpriv.LedControlHandler) \
-			(adapt)->ledpriv.LedControlHandler((adapt), (action)); \
-	} while (0)
-
 void rtl8188eu_InitSwLeds(struct adapter *padapter);
 void rtl8188eu_DeInitSwLeds(struct adapter *padapter);
 
+void rtw_led_control(struct adapter *padapter, enum LED_CTL_MODE LedAction);
+
 #endif /* __RTW_LED_H_ */
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ