[PATCH 07/21] staging: r8188eu: clean up the blink worker code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Merge the BlinkWorkItemCallback and BlinkHandler functions.
Rename the resulting function to blink_work and make it
internal to the led layer.

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

diff --git a/drivers/staging/r8188eu/core/rtw_led.c b/drivers/staging/r8188eu/core/rtw_led.c
index 52e31d3307df..517aef664bfc 100644
--- a/drivers/staging/r8188eu/core/rtw_led.c
+++ b/drivers/staging/r8188eu/core/rtw_led.c
@@ -5,13 +5,6 @@
 #include "../include/rtw_led.h"
 #include "../include/rtl8188e_spec.h"
 
-void BlinkWorkItemCallback(struct work_struct *work)
-{
-	struct delayed_work *dwork = to_delayed_work(work);
-	struct LED_871x *pLed = container_of(dwork, struct LED_871x, blink_work);
-	BlinkHandler(pLed);
-}
-
 static void ResetLedStatus(struct LED_871x *pLed)
 {
 	pLed->CurrLedState = RTW_LED_OFF; /*  Current LED state. */
@@ -391,8 +384,10 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
 	}
 }
 
-void BlinkHandler(struct LED_871x *pLed)
+static void blink_work(struct work_struct *work)
 {
+	struct delayed_work *dwork = to_delayed_work(work);
+	struct LED_871x *pLed = container_of(dwork, struct LED_871x, blink_work);
 	struct adapter *padapter = pLed->padapter;
 
 	if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
@@ -410,7 +405,7 @@ void rtl8188eu_InitSwLeds(struct adapter *padapter)
 
 	pLed->padapter = padapter;
 	ResetLedStatus(pLed);
-	INIT_DELAYED_WORK(&pLed->blink_work, BlinkWorkItemCallback);
+	INIT_DELAYED_WORK(&pLed->blink_work, blink_work);
 }
 
 void rtl8188eu_DeInitSwLeds(struct adapter *padapter)
diff --git a/drivers/staging/r8188eu/include/rtw_led.h b/drivers/staging/r8188eu/include/rtw_led.h
index 984fba6363ad..cd9e40aa7c65 100644
--- a/drivers/staging/r8188eu/include/rtw_led.h
+++ b/drivers/staging/r8188eu/include/rtw_led.h
@@ -100,11 +100,7 @@ struct led_priv{
 			(adapt)->ledpriv.LedControlHandler((adapt), (action)); \
 	} while (0)
 
-void BlinkWorkItemCallback(struct work_struct *work);
-
 void rtl8188eu_InitSwLeds(struct adapter *padapter);
 void rtl8188eu_DeInitSwLeds(struct adapter *padapter);
 
-void BlinkHandler(struct LED_871x * pLed);
-
 #endif /* __RTW_LED_H_ */
-- 
2.30.2





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux