-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathlinux-6.16.patch
More file actions
48 lines (46 loc) · 1.5 KB
/
Copy pathlinux-6.16.patch
File metadata and controls
48 lines (46 loc) · 1.5 KB
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
diff --git a/rc_init.c b/rc_init.c
index d912eb3..0ab398a 100644
--- a/rc_init.c
+++ b/rc_init.c
@@ -2405,9 +2405,12 @@ rc_timeout_done(struct timer_list *t)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
state = (rc_softstate_t *)data;
init_timer(&state->rc_timeout);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
state = from_timer(state, t, rc_timeout);
timer_setup(&state->rc_timeout, rc_timeout_done, 0);
+#else
+ state = timer_container_of(state, t, rc_timeout);
+ timer_setup(&state->rc_timeout, rc_timeout_done, 0);
#endif
up(&state->rc_timeout_sema);
}
diff --git a/rc_msg.c b/rc_msg.c
index 229798d..0ea074e 100644
--- a/rc_msg.c
+++ b/rc_msg.c
@@ -1292,8 +1292,10 @@ rc_msg_timer(struct timer_list * t)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
state = (rc_softstate_t *)data;
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
state = from_timer(state, t, timer);
+#else
+ state = timer_container_of(state, t, timer);
#endif
if ((state->state & ENABLE_TIMER) == 0)
@@ -2395,9 +2397,12 @@ rc_msg_timeout_done(struct timer_list * t)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4,15,0)
state = (rc_softstate_t *)data;
init_timer(&state->msg_timeout);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,16,0)
state = from_timer(state, t, msg_timeout);
timer_setup(&state->msg_timeout, rc_msg_timeout_done, 0);
+#else
+ state = timer_container_of(state, t, msg_timeout);
+ timer_setup(&state->msg_timeout, rc_msg_timeout_done, 0);
#endif
up(&state->msg_timeout_sema);
}