staging: r8188eu: move (de)init functions from hal to rtw_led
authorMartin Kaiser <martin@kaiser.cx>
Sun, 26 Dec 2021 19:55:38 +0000 (20:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Dec 2021 16:12:34 +0000 (17:12 +0100)
Move the led init and deinit functions from the hal layer to rtw_led.c.
rtl8188eu_led.c and rtl8188e_led.h can now be removed.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20211226195556.159471-4-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/Makefile
drivers/staging/r8188eu/core/rtw_led.c
drivers/staging/r8188eu/hal/rtl8188eu_led.c [deleted file]
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/rtl8188e_led.h [deleted file]
drivers/staging/r8188eu/include/rtw_led.h
drivers/staging/r8188eu/os_dep/ioctl_linux.c
drivers/staging/r8188eu/os_dep/os_intfs.c

index 580b9308d5664fb89da0131e683964d5d8673dc9..5e1649491ef4a751735963b0ea7686554a4bcc13 100644 (file)
@@ -22,7 +22,6 @@ r8188eu-y = \
                hal/rtl8188e_rf6052.o \
                hal/rtl8188e_rxdesc.o \
                hal/rtl8188e_xmit.o \
-               hal/rtl8188eu_led.o \
                hal/rtl8188eu_recv.o \
                hal/rtl8188eu_xmit.o \
                hal/usb_halinit.o \
index 2e3a689fb2fd649569a64aaf4e74ceecd283f1af..50dabc3d2e29e50273640abb9ee52c941638ad70 100644 (file)
@@ -417,6 +417,22 @@ void BlinkHandler(struct LED_871x *pLed)
        SwLedBlink1(pLed);
 }
 
+void rtl8188eu_InitSwLeds(struct adapter *padapter)
+{
+       struct led_priv *pledpriv = &padapter->ledpriv;
+
+       pledpriv->LedControlHandler = LedControl8188eu;
+
+       InitLed871x(padapter, &pledpriv->SwLed0);
+}
+
+void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
+{
+       struct led_priv *ledpriv = &padapter->ledpriv;
+
+       DeInitLed871x(&ledpriv->SwLed0);
+}
+
 void LedControl8188eu(struct adapter *padapter, enum LED_CTL_MODE LedAction)
 {
        struct led_priv *ledpriv = &padapter->ledpriv;
diff --git a/drivers/staging/r8188eu/hal/rtl8188eu_led.c b/drivers/staging/r8188eu/hal/rtl8188eu_led.c
deleted file mode 100644 (file)
index 46dd8c6..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#include "../include/osdep_service.h"
-#include "../include/drv_types.h"
-#include "../include/rtl8188e_hal.h"
-#include "../include/rtl8188e_led.h"
-
-/*  Interface to manipulate LED objects. */
-/*  Default LED behavior. */
-
-/*     Description: */
-/*             Initialize all LED_871x objects. */
-void rtl8188eu_InitSwLeds(struct adapter *padapter)
-{
-       struct led_priv *pledpriv = &padapter->ledpriv;
-
-       pledpriv->LedControlHandler = LedControl8188eu;
-
-       InitLed871x(padapter, &pledpriv->SwLed0);
-}
-
-/*     Description: */
-/*             DeInitialize all LED_819xUsb objects. */
-void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
-{
-       struct led_priv *ledpriv = &padapter->ledpriv;
-
-       DeInitLed871x(&ledpriv->SwLed0);
-}
index 9edde72aebb2fac6d61b75115894f8e2240f7d17..293a616eabc62280d93f614f689232d2d6126e69 100644 (file)
@@ -8,7 +8,6 @@
 #include "../include/rtw_efuse.h"
 
 #include "../include/rtl8188e_hal.h"
-#include "../include/rtl8188e_led.h"
 #include "../include/rtw_iol.h"
 #include "../include/usb_ops.h"
 #include "../include/usb_osintf.h"
diff --git a/drivers/staging/r8188eu/include/rtl8188e_led.h b/drivers/staging/r8188eu/include/rtl8188e_led.h
deleted file mode 100644 (file)
index 02cdc97..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
-/* Copyright(c) 2007 - 2011 Realtek Corporation. */
-
-#ifndef __RTL8188E_LED_H__
-#define __RTL8188E_LED_H__
-
-#include "osdep_service.h"
-#include "drv_types.h"
-
-/*  */
-/*  Interface to manipulate LED objects. */
-/*  */
-void rtl8188eu_InitSwLeds(struct adapter *padapter);
-void rtl8188eu_DeInitSwLeds(struct adapter *padapter);
-
-#endif
index 37f1dbc111f1407952fc7c099a4d92b2a624a021..d4ba5ac3e48af1a37d0d6e374031dd548a226333 100644 (file)
@@ -107,6 +107,9 @@ void ResetLedStatus(struct LED_871x * pLed);
 void InitLed871x(struct adapter *padapter, struct LED_871x *pLed);
 void DeInitLed871x(struct LED_871x *pLed);
 
+void rtl8188eu_InitSwLeds(struct adapter *padapter);
+void rtl8188eu_DeInitSwLeds(struct adapter *padapter);
+
 void BlinkHandler(struct LED_871x * pLed);
 
 #endif /* __RTW_LED_H_ */
index e7f35143dfe1e0f492ef1a78670ffb56d72c1253..88e9734b309469211ac17619d22dade80641b80c 100644 (file)
@@ -12,7 +12,7 @@
 #include "../include/rtw_ioctl_set.h"
 #include "../include/usb_ops.h"
 #include "../include/rtl8188e_hal.h"
-#include "../include/rtl8188e_led.h"
+#include "../include/rtw_led.h"
 
 #include "../include/rtw_iol.h"
 
index ad20ab12ee8c23c764b90082d25d57f481cfd478..f81e26785d664b74ecc4b589c1f341c2685cc93a 100644 (file)
@@ -11,7 +11,7 @@
 #include "../include/rtw_ioctl.h"
 #include "../include/usb_osintf.h"
 #include "../include/rtw_br_ext.h"
-#include "../include/rtl8188e_led.h"
+#include "../include/rtw_led.h"
 #include "../include/rtl8188e_dm.h"
 
 MODULE_LICENSE("GPL");