Changeset 36020


Ignore:
Timestamp:
2013-03-14T19:43:02+01:00 (5 years ago)
Author:
blogic
Message:

[lantiq] make lib-ifxos work with v3.8

Signed-off-by: John Crispin <blogic@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/platform/lantiq/ltq-ifxos/patches/100-compat.patch

    r34692 r36020  
    1 --- a/configure.in 
    2 +++ b/configure.in 
    3 @@ -64,7 +64,7 @@ dnl Set kernel build path 
     1Index: lib_ifxos-1.5.14/configure.in 
     2=================================================================== 
     3--- lib_ifxos-1.5.14.orig/configure.in  2010-07-22 18:34:07.000000000 +0200 
     4+++ lib_ifxos-1.5.14/configure.in       2013-03-14 08:23:57.481810836 +0100 
     5@@ -64,7 +64,7 @@ 
    46 AC_ARG_ENABLE(kernelbuild, 
    57        AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path (only for kernel 2.6.x)), 
     
    1012                else 
    1113                        AC_MSG_ERROR([The kernel build directory is not valid or not configured!]) 
    12 --- a/src/linux/ifxos_linux_thread_drv.c 
    13 +++ b/src/linux/ifxos_linux_thread_drv.c 
    14 @@ -34,7 +34,6 @@ 
     14Index: lib_ifxos-1.5.14/src/linux/ifxos_linux_thread_drv.c 
     15=================================================================== 
     16--- lib_ifxos-1.5.14.orig/src/linux/ifxos_linux_thread_drv.c    2010-01-08 18:10:47.000000000 +0100 
     17+++ lib_ifxos-1.5.14/src/linux/ifxos_linux_thread_drv.c 2013-03-14 08:23:57.481810836 +0100 
     18@@ -34,8 +34,8 @@ 
    1519 #include <linux/sched.h> 
    1620 #include <linux/version.h> 
     
    1822-#include <linux/smp_lock.h> 
    1923 #include <linux/signal.h> 
     24+#include <linux/kthread.h> 
    2025  
    2126  
     27 #include "ifx_types.h" 
     28@@ -68,10 +68,6 @@ 
     29 #if ( defined(IFXOS_HAVE_THREAD) && (IFXOS_HAVE_THREAD == 1) ) 
     30  
     31  
     32-IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup( 
     33-                              IFXOS_ThreadCtrl_t *pThrCntrl); 
     34- 
     35- 
     36 /* ============================================================================ 
     37    IFX Linux adaptation - Kernel Thread handling 
     38    ========================================================================= */ 
     39@@ -96,9 +92,9 @@ 
     40    - IFX_SUCCESS on success 
     41    - IFX_ERROR on error 
     42 */ 
     43-IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup( 
     44-                              IFXOS_ThreadCtrl_t *pThrCntrl) 
     45+int IFXOS_KernelThreadStartup(void *data) 
     46 { 
     47+   IFXOS_ThreadCtrl_t *pThrCntrl = (IFXOS_ThreadCtrl_t*) data; 
     48    IFX_int32_t retVal          = IFX_ERROR; 
     49 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) 
     50    struct task_struct *kthread = current; 
     51@@ -139,7 +135,7 @@ 
     52    /* let others run */ 
     53    unlock_kernel(); 
     54 #else 
     55-   daemonize(pThrCntrl->thrParams.pName); 
     56+   //daemonize(pThrCntrl->thrParams.pName); 
     57  
     58    /* Enable signals in Kernel >= 2.6 */ 
     59    allow_signal(SIGKILL); 
     60@@ -218,9 +214,7 @@ 
     61          init_completion(&pThrCntrl->thrCompletion); 
     62  
     63          /* start kernel thread via the wrapper function */ 
     64-         pThrCntrl->tid = kernel_thread( (IFXOS_KERNEL_THREAD_StartRoutine)IFXOS_KernelThreadStartup, 
     65-                        (void *)pThrCntrl, 
     66-                        IFXOS_DRV_THREAD_OPTIONS); 
     67+         pThrCntrl->tid = kthread_run(IFXOS_KernelThreadStartup, (void *)pThrCntrl, "ifxos"); 
     68  
     69          pThrCntrl->bValid = IFX_TRUE; 
     70  
     71Index: lib_ifxos-1.5.14/src/include/ifxos_thread.h 
     72=================================================================== 
     73--- lib_ifxos-1.5.14.orig/src/include/ifxos_thread.h    2010-01-14 10:59:13.000000000 +0100 
     74+++ lib_ifxos-1.5.14/src/include/ifxos_thread.h 2013-03-14 08:24:43.577812806 +0100 
     75@@ -111,7 +111,7 @@ 
     76 /** 
     77    Function type of the user thread/task function. 
     78 */ 
     79-typedef IFX_int32_t (*IFXOS_ThreadFunction_t)(IFXOS_ThreadParams_t *); 
     80+typedef int (*IFXOS_ThreadFunction_t)(void*); 
     81  
     82 /** @} */ 
     83  
     84Index: lib_ifxos-1.5.14/src/include/linux/ifxos_linux_thread.h 
     85=================================================================== 
     86--- lib_ifxos-1.5.14.orig/src/include/linux/ifxos_linux_thread.h        2010-01-08 18:10:27.000000000 +0100 
     87+++ lib_ifxos-1.5.14/src/include/linux/ifxos_linux_thread.h     2013-03-14 08:25:13.193814073 +0100 
     88@@ -152,7 +152,7 @@ 
     89    IFXOS_ThreadFunction_t  pThrFct; 
     90  
     91    /** Kernel thread process ID */ 
     92-   IFX_int32_t             tid; 
     93+   struct task_struct             *tid; 
     94  
     95    /** requested kernel thread priority */ 
     96    IFX_int32_t             nPriority; 
Note: See TracChangeset for help on using the changeset viewer.