Skip to content

Commit

Permalink
ltq-tapi: Fix compile with kernel 5.15
Browse files Browse the repository at this point in the history
Do not use find_vpid(), but get_task_pid() to get the pid from
pThrCntrl->tid. This is now a ponter to struct task_struct instead of
an integer.

This fixes the build of ltq-tapi with lantiq/xway.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  • Loading branch information
hauke committed Nov 5, 2022
1 parent b3aa998 commit 898b410
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/src/drv_tapi_linux.c
+++ b/src/drv_tapi_linux.c
@@ -3779,8 +3779,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
mb();
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
kill_proc(pThrCntrl->tid, SIGKILL, 1);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
+#else
+ kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1);
#endif
/* release the big kernel lock */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)

0 comments on commit 898b410

Please sign in to comment.