[lantiq]
[openwrt/svn-archive/archive.git] / package / ltq-tapi / patches / 200-linux-37.patch
1 --- a/src/drv_tapi_linux.c
2 +++ b/src/drv_tapi_linux.c
3 @@ -146,8 +146,13 @@ static ssize_t ifx_tapi_write(struct fil
4 size_t count, loff_t * ppos);
5 static ssize_t ifx_tapi_read(struct file * filp, char *buf,
6 size_t length, loff_t * ppos);
7 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
8 static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
9 unsigned int nCmd, unsigned long nArgument);
10 +#else
11 +static long ifx_tapi_ioctl(struct file *filp,
12 + unsigned int nCmd, unsigned long nArgument);
13 +#endif
14 static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table);
15
16 #ifdef CONFIG_PROC_FS
17 @@ -231,7 +236,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
18 IFX_char_t *pRegDrvName = IFX_NULL;
19 IFX_int32_t ret = 0;
20
21 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
22 if (tapi_fops.ioctl == IFX_NULL)
23 +#else
24 + if (tapi_fops.unlocked_ioctl == IFX_NULL)
25 +#endif
26 {
27 #ifdef MODULE
28 tapi_fops.owner = THIS_MODULE;
29 @@ -239,7 +248,11 @@ IFX_return_t TAPI_OS_RegisterLLDrv (IFX_
30 tapi_fops.read = ifx_tapi_read;
31 tapi_fops.write = ifx_tapi_write;
32 tapi_fops.poll = ifx_tapi_poll;
33 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
34 tapi_fops.ioctl = ifx_tapi_ioctl;
35 +#else
36 + tapi_fops.unlocked_ioctl = ifx_tapi_ioctl;
37 +#endif
38 tapi_fops.open = ifx_tapi_open;
39 tapi_fops.release = ifx_tapi_release;
40 }
41 @@ -894,8 +907,13 @@ static IFX_uint32_t ifx_tapi_poll (struc
42 - 0 and positive values - success
43 - negative value - ioctl failed
44 */
45 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
46 static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
47 unsigned int nCmd, unsigned long nArg)
48 +#else
49 +static long ifx_tapi_ioctl(struct file *filp,
50 + unsigned int nCmd, unsigned long nArg)
51 +#endif
52 {
53 TAPI_FD_PRIV_DATA_t *pTapiPriv;
54 IFX_TAPI_ioctlCtx_t ctx;
55 --- a/src/lib/lib_fifo/lib_fifo.c
56 +++ b/src/lib/lib_fifo/lib_fifo.c
57 @@ -41,7 +41,7 @@
58 #ifdef LINUX
59 /* if linux/slab.h is not available, use the precessor linux/malloc.h */
60 #include <linux/slab.h>
61 -#elif VXWORKS
62 +#elif defined(VXWORKS)
63 #include <sys_drv_debug.h>
64 #endif /* LINUX */
65