lantiq: Tune the XWAY subtarget cflags
[openwrt/openwrt.git] / package / platform / lantiq / ltq-adsl / patches / 130-linux3.8.patch
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
5 @@ -11,6 +11,7 @@
6 #ifdef __LINUX__
7
8 #define DSL_INTERN
9 +#include <linux/kthread.h>
10 #include <linux/device.h>
11 #include <linux/platform_device.h>
12
13 @@ -40,7 +41,7 @@
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);
16 #else
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);
20 #endif
21 static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
22 @@ -184,7 +185,7 @@
23 DSL_uint_t nCommand,
24 unsigned long nArg)
25 #else
26 -static DSL_int_t DSL_DRV_Ioctls(
27 +static long DSL_DRV_Ioctls(
28 DSL_DRV_file_t * pFile,
29 DSL_uint_t nCommand,
30 unsigned long nArg)
31 @@ -521,9 +522,9 @@
32 - IFX_SUCCESS on success
33 - IFX_ERROR on error
34 */
35 -DSL_DRV_STATIC DSL_int32_t DSL_DRV_KernelThreadStartup(
36 - DSL_DRV_ThreadCtrl_t *pThrCntrl)
37 +static int DSL_DRV_KernelThreadStartup(void *data)
38 {
39 + DSL_DRV_ThreadCtrl_t *pThrCntrl = (DSL_DRV_ThreadCtrl_t*) data;
40 DSL_int32_t retVal = -1;
41 #ifndef _lint
42
43 @@ -546,30 +547,6 @@
44 (DSL_NULL, "ENTER - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
45 pThrCntrl->thrParams.pName));
46
47 - /* do LINUX specific setup */
48 -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
49 - daemonize();
50 - reparent_to_init();
51 -
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)
55 - */
56 - lock_kernel();
57 -
58 - /* Don't care about any signals. */
59 - siginitsetinv(&current->blocked, 0);
60 -
61 - /* set name of this process */
62 - strcpy(kthread->comm, pThrCntrl->thrParams.pName);
63 -
64 - /* let others run */
65 - unlock_kernel();
66 -#else
67 - daemonize(pThrCntrl->thrParams.pName);
68 -
69 -#endif
70 -
71 /*DSL_DRV_ThreadPriorityModify(pThrCntrl->nPriority);*/
72
73 pThrCntrl->thrParams.bRunning = 1;
74 @@ -639,9 +616,7 @@
75 init_completion(&pThrCntrl->thrCompletion);
76
77 /* start kernel thread via the wrapper function */
78 - pThrCntrl->pid = kernel_thread( (DSL_DRV_KERNEL_THREAD_StartRoutine)DSL_DRV_KernelThreadStartup,
79 - (void *)pThrCntrl,
80 - DSL_DRV_DRV_THREAD_OPTIONS);
81 + pThrCntrl->pid = kthread_run(DSL_DRV_KernelThreadStartup, (void *)pThrCntrl, pThrCntrl->thrParams.pName);
82
83 pThrCntrl->bValid = DSL_TRUE;
84
85 @@ -1064,12 +1039,12 @@
86 #endif
87
88 /* Entry point of driver */
89 -static int __devinit ltq_adsl_probe(struct platform_device *pdev)
90 +static int ltq_adsl_probe(struct platform_device *pdev)
91 {
92 struct class *dsl_class;
93 DSL_int_t i;
94
95 - printk(DSL_DRV_CRLF DSL_DRV_CRLF "Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
96 + printk("Infineon CPE API Driver version: %s" DSL_DRV_CRLF,
97 &(dsl_cpe_api_version[4]));
98
99 DSL_DRV_MemSet( ifxDevices, 0, sizeof(DSL_devCtx_t) * DSL_DRV_MAX_DEVICE_NUMBER );
100 @@ -1118,7 +1093,7 @@
101 return 0;
102 }
103
104 -static int __devexit ltq_adsl_remove(struct platform_device *pdev)
105 +static int ltq_adsl_remove(struct platform_device *pdev)
106 {
107 printk("Module will be unloaded"DSL_DRV_CRLF);
108
109 @@ -1163,7 +1138,7 @@
110
111 static struct platform_driver ltq_adsl_driver = {
112 .probe = ltq_adsl_probe,
113 - .remove = __devexit_p(ltq_adsl_remove),
114 + .remove = ltq_adsl_remove,
115 .driver = {
116 .name = "adsl",
117 .owner = THIS_MODULE,
118 Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_lint_map.h
119 ===================================================================
120 --- 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
121 +++ 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
122 @@ -247,7 +247,7 @@
123 DSL_DRV_ThreadFunction_t pThrFct;
124
125 /** Kernel thread process ID */
126 - DSL_int32_t pid;
127 + struct task_struct *pid;
128
129 /** requested kernel thread priority */
130 DSL_int32_t nPriority;
131 Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
132 ===================================================================
133 --- 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
134 +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 2013-03-14 11:44:50.330326079 +0100
135 @@ -288,7 +288,7 @@
136 DSL_DRV_ThreadFunction_t pThrFct;
137
138 /** Kernel thread process ID */
139 - DSL_int32_t pid;
140 + struct task_struct *pid;
141
142 /** requested kernel thread priority */
143 DSL_int32_t nPriority;