From d91f4be99d2deac55e0fbde190655e55e80ab44d Mon Sep 17 00:00:00 2001 From: Christian B Date: Sun, 17 Dec 2017 11:53:07 +0100 Subject: [PATCH] Update hal_usb_led.c --- hal/led/hal_usb_led.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/hal/led/hal_usb_led.c b/hal/led/hal_usb_led.c index ae0535c..117bc93 100644 --- a/hal/led/hal_usb_led.c +++ b/hal/led/hal_usb_led.c @@ -1815,17 +1815,9 @@ void BlinkHandler(PLED_USB pLed) * Callback function of LED BlinkTimer, * it just schedules to corresponding BlinkWorkItem/led_blink_hdl * */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) -void BlinkTimerCallback(struct timer_list *t) -#else void BlinkTimerCallback(void *data) -#endif { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - PLED_USB pLed = from_timer(pLed, t, BlinkTimer); -#else PLED_USB pLed = (PLED_USB)data; -#endif _adapter *padapter = pLed->padapter; /* RTW_INFO("%s\n", __FUNCTION__); */ @@ -4237,11 +4229,7 @@ InitLed( pLed->LedPin = LedPin; ResetLedStatus(pLed); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - timer_setup(&pLed->BlinkTimer, BlinkTimerCallback, 0); -#else - _init_timer(&pLed->BlinkTimer, padapter->pnetdev, BlinkTimerCallback, pLed); -#endif + _init_timer(&(pLed->BlinkTimer), padapter->pnetdev, BlinkTimerCallback, pLed); _init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed); }