aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-tapi/patches/400-linux-415.patch
blob: cddb1b6553cd80573609bb7a2197d830b310b6d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
--- a/src/drv_tapi_linux.c
+++ b/src/drv_tapi_linux.c
@@ -119,7 +119,11 @@ struct _TAPI_FD_PRIV_DATA
 /* ============================= */
 /* Local Functions               */
 /* ============================= */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
 static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg);
+#else
+static IFX_void_t TAPI_timer_call_back (struct timer_list *t);
+#endif
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20))
 static IFX_void_t TAPI_tqueue (IFX_void_t *pWork);
 #else /* for Kernel newer or equal 2.6.20 */
@@ -3384,11 +3388,15 @@ Timer_ID TAPI_Create_Timer(TIMER_ENTRY p
    pTimerData->nArgument = nArgument;
    pTimerData->bStopped = IFX_FALSE;
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0))
    init_timer(&(pTimerData->Timer_List));
 
    /* set timer call back function */
    pTimerData->Timer_List.function = TAPI_timer_call_back;
    pTimerData->Timer_List.data = (IFX_ulong_t) pTimerData;
+#else
+   timer_setup(&(pTimerData->Timer_List), TAPI_timer_call_back, 0);
+#endif
 
    /* Initialize Timer Task */
 #ifdef LINUX_2_6
@@ -3529,9 +3537,17 @@ static IFX_void_t TAPI_tqueue (struct wo
 
    \param  arg          Pointer to corresponding timer ID.
 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
 static IFX_void_t TAPI_timer_call_back (IFX_ulong_t arg)
+#else
+static IFX_void_t TAPI_timer_call_back (struct timer_list *t)
+#endif
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
    Timer_ID Timer = (Timer_ID) arg;
+#else
+   Timer_ID Timer = from_timer(Timer, t, Timer_List);
+#endif
    /* do the operation in process context,
       not in interrupt context */
 #ifdef LINUX_2_6