1 Index: drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c
2 ===================================================================
3 --- drv_dsl_cpe_api-3.24.4.4.orig/src/common/drv_dsl_cpe_os_linux.c 2013-03-14 11:44:50.318326078 +0100
4 +++ drv_dsl_cpe_api-3.24.4.4/src/common/drv_dsl_cpe_os_linux.c 2013-03-14 11:46:08.562329425 +0100
9 +#include <linux/kthread.h>
10 #include <linux/device.h>
11 #include <linux/platform_device.h>
14 static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
15 DSL_uint_t nCommand, unsigned long nArg);
17 -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
18 +static long DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
19 DSL_uint_t nCommand, unsigned long nArg);
21 static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
26 -static DSL_int_t DSL_DRV_Ioctls(
27 +static long DSL_DRV_Ioctls(
28 DSL_DRV_file_t * pFile,
32 - IFX_SUCCESS on success
35 -DSL_DRV_STATIC DSL_int32_t DSL_DRV_KernelThreadStartup(
36 - DSL_DRV_ThreadCtrl_t *pThrCntrl)
37 +static int DSL_DRV_KernelThreadStartup(void *data)
39 + DSL_DRV_ThreadCtrl_t *pThrCntrl = (DSL_DRV_ThreadCtrl_t*) data;
40 DSL_int32_t retVal = -1;
44 (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
45 pThrCntrl->thrParams.pName));
47 - /* do LINUX specific setup */
48 -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
52 - /* lock the kernel. A new kernel thread starts without
53 - the big kernel lock, regardless of the lock state
54 - of the creator (the lock level is *not* inheritated)
58 - /* Don't care about any signals. */
59 - siginitsetinv(¤t->blocked, 0);
61 - /* set name of this process */
62 - strcpy(kthread->comm, pThrCntrl->thrParams.pName);
64 - /* let others run */
67 - daemonize(pThrCntrl->thrParams.pName);
71 /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
73 pThrCntrl->thrParams.bRunning = 1;
75 if (DSL_DRV_THREAD_INIT_VALID(pThrCntrl) == DSL_FALSE)
77 /* set thread function arguments */
78 - strcpy(pThrCntrl->thrParams.pName, pName);
79 + snprintf(pThrCntrl->thrParams.pName, DSL_DRV_THREAD_NAME_LEN, "adsl - %s", pName);
80 pThrCntrl->nPriority = nPriority;
81 pThrCntrl->thrParams.nArg1 = nArg1;
82 pThrCntrl->thrParams.nArg2 = nArg2;
84 init_completion(&pThrCntrl->thrCompletion);
86 /* start kernel thread via the wrapper function */
87 - pThrCntrl->pid = kernel_thread( (DSL_DRV_KERNEL_THREAD_StartRoutine)DSL_DRV_KernelThreadStartup,
89 - DSL_DRV_DRV_THREAD_OPTIONS);
90 + pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
92 pThrCntrl->bValid = DSL_TRUE;
94 @@ -1064,12 +1039,12 @@
97 /* Entry point of driver */
98 -static int __devinit ltq_adsl_probe(struct platform_device *pdev)
99 +static int ltq_adsl_probe(struct platform_device *pdev)
101 struct class *dsl_class;
104 - printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
105 + printk("Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
106 &(dsl_cpe_api_version[4]));
108 DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER );
109 @@ -1118,7 +1093,7 @@
113 -static int __devexit ltq_adsl_remove(struct platform_device *pdev)
114 +static int ltq_adsl_remove(struct platform_device *pdev)
116 printk("Module will be unloaded"DSL_DRV_CRLF);
118 @@ -1163,7 +1138,7 @@
120 static struct platform_driver ltq_adsl_driver = {
121 .probe = ltq_adsl_probe,
122 - .remove = __devexit_p(ltq_adsl_remove),
123 + .remove = ltq_adsl_remove,
126 .owner = THIS_MODULE,
127 Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h
128 ===================================================================
129 --- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_lint_map.h 2009-02-24 21:44:54.000000000 +0100
130 +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h 2013-03-14 11:44:50.330326079 +0100
132 DSL_DRV_ThreadFunction_t pThrFct;
134 /** Kernel thread process ID */
136 + struct task_struct *pid;
138 /** requested kernel thread priority */
139 DSL_int32_t nPriority;
140 Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
141 ===================================================================
142 --- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h 2013-03-14 11:44:50.298326077 +0100
143 +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 2013-03-14 11:44:50.330326079 +0100
145 DSL_DRV_ThreadFunction_t pThrFct;
147 /** Kernel thread process ID */
149 + struct task_struct *pid;
151 /** requested kernel thread priority */
152 DSL_int32_t nPriority;