mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Updates for timer changes in kernel 4.15
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e472b5d684
commit
1f08a062ad
13 changed files with 196 additions and 7 deletions
|
@ -26,9 +26,17 @@
|
|||
/* 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)
|
||||
struct LED_871x *pLed = from_timer(pLed, t, BlinkTimer);
|
||||
#else
|
||||
struct LED_871x *pLed = (struct LED_871x *)data;
|
||||
#endif
|
||||
struct adapter *padapter = pLed->padapter;
|
||||
|
||||
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
|
||||
|
@ -78,8 +86,11 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed, enum LED_PIN_8
|
|||
|
||||
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_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue