mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 03/21] staging: r8188eu: move (de)init functions from hal to rtw_led
Date: Sun, 26 Dec 2021 20:55:38 +0100	[thread overview]
Message-ID: <20211226195556.159471-4-martin@kaiser.cx> (raw)
In-Reply-To: <20211226195556.159471-1-martin@kaiser.cx>

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>
---
 drivers/staging/r8188eu/Makefile              |  1 -
 drivers/staging/r8188eu/core/rtw_led.c        | 16 ++++++++++
 drivers/staging/r8188eu/hal/rtl8188eu_led.c   | 30 -------------------
 drivers/staging/r8188eu/hal/usb_halinit.c     |  1 -
 .../staging/r8188eu/include/rtl8188e_led.h    | 16 ----------
 drivers/staging/r8188eu/include/rtw_led.h     |  3 ++
 drivers/staging/r8188eu/os_dep/ioctl_linux.c  |  2 +-
 drivers/staging/r8188eu/os_dep/os_intfs.c     |  2 +-
 8 files changed, 21 insertions(+), 50 deletions(-)
 delete mode 100644 drivers/staging/r8188eu/hal/rtl8188eu_led.c
 delete mode 100644 drivers/staging/r8188eu/include/rtl8188e_led.h

diff --git a/drivers/staging/r8188eu/Makefile b/drivers/staging/r8188eu/Makefile
index 580b9308d566..5e1649491ef4 100644
--- a/drivers/staging/r8188eu/Makefile
+++ b/drivers/staging/r8188eu/Makefile
@@ -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 \
diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index 2e3a689fb2fd..50dabc3d2e29 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -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
index 46dd8c6703b7..000000000000
--- a/drivers/staging/r8188eu/hal/rtl8188eu_led.c
+++ /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);
-}
diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index 9edde72aebb2..293a616eabc6 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -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
index 02cdc970bb17..000000000000
--- a/drivers/staging/r8188eu/include/rtl8188e_led.h
+++ /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
diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h
index 37f1dbc111f1..d4ba5ac3e48a 100644
--- a/drivers/staging/r8188eu/include/rtw_led.h
+++ b/drivers/staging/r8188eu/include/rtw_led.h
@@ -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_ */
diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
index e7f35143dfe1..88e9734b3094 100644
--- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c
@@ -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"
 
diff --git a/drivers/staging/r8188eu/os_dep/os_intfs.c b/drivers/staging/r8188eu/os_dep/os_intfs.c
index ad20ab12ee8c..f81e26785d66 100644
--- a/drivers/staging/r8188eu/os_dep/os_intfs.c
+++ b/drivers/staging/r8188eu/os_dep/os_intfs.c
@@ -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");
-- 
2.30.2


  parent reply	other threads:[~2021-12-26 19:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 19:55 [PATCH 00/21] staging: r8188eu: simplify the led layer Martin Kaiser
2021-12-26 19:55 ` [PATCH 01/21] staging: r8188eu: switch the led off during deinit Martin Kaiser
2021-12-26 19:55 ` [PATCH 02/21] staging: r8188eu: move SwLedOn and SwLedOff into rtw_led.c Martin Kaiser
2021-12-26 19:55 ` Martin Kaiser [this message]
2021-12-26 19:55 ` [PATCH 04/21] staging: r8188eu: merge InitLed871x and rtl8188eu_InitSwLeds Martin Kaiser
2021-12-26 19:55 ` [PATCH 05/21] staging: r8188eu: merge DeInitLed871x and rtl8188eu_DeInitSwLeds Martin Kaiser
2021-12-26 19:55 ` [PATCH 06/21] staging: r8188eu: make ResetLedStatus static Martin Kaiser
2021-12-26 19:55 ` [PATCH 07/21] staging: r8188eu: clean up the blink worker code Martin Kaiser
2021-12-26 19:55 ` [PATCH 08/21] staging: r8188eu: clean up blinking macros Martin Kaiser
2021-12-26 19:55 ` [PATCH 09/21] staging: r8188eu: remove unused blink mode defines Martin Kaiser
2021-12-26 19:55 ` [PATCH 10/21] staging: r8188eu: bLedStartToLinkBlinkInProgress is set but not used Martin Kaiser
2021-12-26 19:55 ` [PATCH 11/21] staging: r8188eu: make blink interval defines internal Martin Kaiser
2021-12-26 19:55 ` [PATCH 12/21] staging: r8188eu: use bool for boolean values Martin Kaiser
2021-12-26 19:55 ` [PATCH 13/21] staging: r8188eu: remove obsolete comments Martin Kaiser
2021-12-26 19:55 ` [PATCH 14/21] staging: r8188eu: remove LedControlHandler Martin Kaiser
2021-12-26 19:55 ` [PATCH 15/21] staging: r8188eu: LED_CTL_POWER_ON is not used Martin Kaiser
2021-12-26 19:55 ` [PATCH 16/21] staging: r8188eu: LED_CTL_START_WPS_BOTTON " Martin Kaiser
2021-12-26 19:55 ` [PATCH 17/21] staging: r8188eu: remove bStopBlinking Martin Kaiser
2021-12-26 19:55 ` [PATCH 18/21] staging: r8188eu: summarize some BlinkingLedState Martin Kaiser
2021-12-26 19:55 ` [PATCH 19/21] staging: r8188eu: merge blink_work and SwLedBlink1 Martin Kaiser
2021-12-26 19:55 ` [PATCH 20/21] staging: r8188eu: merge rtw_led_control and SwLedControlMode1 Martin Kaiser
2021-12-26 19:55 ` [PATCH 21/21] staging: r8188eu: rfoff_reason is never initialised Martin Kaiser

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=20211226195556.159471-4-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

all inboxes | Powered by JetHome®