[openwrt/openwrt] ltq-ifxos: fix compilation error with kernel 6.1

LEDE Commits lede-commits at lists.infradead.org
Sun Aug 27 10:27:37 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/27633cefac14fe0e0fde4e6285b9241076124c62

commit 27633cefac14fe0e0fde4e6285b9241076124c62
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Aug 22 12:37:10 2023 +0200

    ltq-ifxos: fix compilation error with kernel 6.1
    
    Conditionally use the newer APIs.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
index 45059890e1..a3f210487e 100644
--- a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
+++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch
@@ -90,3 +90,17 @@
     return ret;
  }
  
+--- a/src/linux/ifxos_linux_thread_drv.c
++++ b/src/linux/ifxos_linux_thread_drv.c
+@@ -154,7 +154,11 @@ IFXOS_STATIC int IFXOS_KernelThreadStart
+    retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
+    pThrCntrl->thrParams.bRunning = IFX_FALSE;
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,17,0))
++   kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
++#else
+    complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
++#endif
+ 
+    IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL,
+       ("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF,




More information about the lede-commits mailing list