1 --- a/src/common/drv_dsl_cpe_os_linux.c
2 +++ b/src/common/drv_dsl_cpe_os_linux.c
7 +#include <linux/kthread.h>
8 #include <linux/of_platform.h>
10 #include "drv_dsl_cpe_api.h"
11 @@ -39,7 +40,7 @@ static DSL_ssize_t DSL_DRV_Write(DSL_DRV
12 static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
13 DSL_uint_t nCommand, unsigned long nArg);
15 -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
16 +static long DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
17 DSL_uint_t nCommand, unsigned long nArg);
19 static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
20 @@ -183,7 +184,7 @@ static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_
24 -static DSL_int_t DSL_DRV_Ioctls(
25 +static long DSL_DRV_Ioctls(
26 DSL_DRV_file_t * pFile,
29 @@ -520,9 +521,9 @@ DSL_void_t* DSL_IoctlMemCpyTo(
30 - IFX_SUCCESS on success
33 -DSL_DRV_STATIC DSL_int32_t DSL_DRV_KernelThreadStartup(
34 - DSL_DRV_ThreadCtrl_t *pThrCntrl)
35 +static int DSL_DRV_KernelThreadStartup(void *data)
37 + DSL_DRV_ThreadCtrl_t *pThrCntrl = (DSL_DRV_ThreadCtrl_t*) data;
38 DSL_int32_t retVal = -1;
41 @@ -545,30 +546,6 @@ DSL_DRV_STATIC DSL_int32_t DSL_DRV_Kerne
42 (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
43 pThrCntrl->thrParams.pName));
45 - /* do LINUX specific setup */
46 -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
50 - /* lock the kernel. A new kernel thread starts without
51 - the big kernel lock, regardless of the lock state
52 - of the creator (the lock level is *not* inheritated)
56 - /* Don't care about any signals. */
57 - siginitsetinv(¤t->blocked, 0);
59 - /* set name of this process */
60 - strcpy(kthread->comm, pThrCntrl->thrParams.pName);
62 - /* let others run */
65 - daemonize(pThrCntrl->thrParams.pName);
69 /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
71 pThrCntrl->thrParams.bRunning = 1;
72 @@ -638,9 +615,7 @@ DSL_int32_t DSL_DRV_ThreadInit(
73 init_completion(&pThrCntrl->thrCompletion);
75 /* start kernel thread via the wrapper function */
76 - pThrCntrl->pid = kernel_thread( (DSL_DRV_KERNEL_THREAD_StartRoutine)DSL_DRV_KernelThreadStartup,
78 - DSL_DRV_DRV_THREAD_OPTIONS);
79 + pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
81 pThrCntrl->bValid = DSL_TRUE;
83 @@ -1070,12 +1045,12 @@ static void DSL_DRV_DebugInit(void)
86 /* Entry point of driver */
87 -static int __devinit ltq_adsl_probe(struct platform_device *pdev)
88 +static int ltq_adsl_probe(struct platform_device *pdev)
90 struct class *dsl_class;
93 - printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
94 + printk("Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
95 &(dsl_cpe_api_version[4]));
97 DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER );
98 @@ -1124,7 +1099,7 @@ static int __devinit ltq_adsl_probe(stru
102 -static int __devexit ltq_adsl_remove(struct platform_device *pdev)
103 +static int ltq_adsl_remove(struct platform_device *pdev)
105 printk("Module will be unloaded"DSL_DRV_CRLF);
107 @@ -1169,7 +1144,7 @@ MODULE_DEVICE_TABLE(of, ltq_adsl_match);
109 static struct platform_driver ltq_adsl_driver = {
110 .probe = ltq_adsl_probe,
111 - .remove = __devexit_p(ltq_adsl_remove),
112 + .remove = ltq_adsl_remove,
115 .owner = THIS_MODULE,
116 --- a/src/include/drv_dsl_cpe_os_lint_map.h
117 +++ b/src/include/drv_dsl_cpe_os_lint_map.h
118 @@ -247,7 +247,7 @@ typedef struct
119 DSL_DRV_ThreadFunction_t pThrFct;
121 /** Kernel thread process ID */
123 + struct task_struct *pid;
125 /** requested kernel thread priority */
126 DSL_int32_t nPriority;
127 --- a/src/include/drv_dsl_cpe_os_linux.h
128 +++ b/src/include/drv_dsl_cpe_os_linux.h
129 @@ -288,7 +288,7 @@ typedef struct
130 DSL_DRV_ThreadFunction_t pThrFct;
132 /** Kernel thread process ID */
134 + struct task_struct *pid;
136 /** requested kernel thread priority */
137 DSL_int32_t nPriority;