1 --- a/src/drv_tapi_linux.c
2 +++ b/src/drv_tapi_linux.c
4 #include <linux/errno.h>
5 #include <asm/uaccess.h> /* copy_from_user(), ... */
6 #include <asm/byteorder.h>
7 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
8 #include <linux/smp_lock.h> /* lock_kernel() */
15 #include <linux/tqueue.h>
16 #include <linux/sched.h>
17 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
18 #include <linux/smp_lock.h> /* lock_kernel() */
20 #endif /* LINUX_2_6 */
24 size_t count, loff_t * ppos);
25 static ssize_t ifx_tapi_read(struct file * filp, char *buf,
26 size_t length, loff_t * ppos);
27 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
28 static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
29 unsigned int nCmd, unsigned long nArgument);
31 +static long ifx_tapi_ioctl(struct file *filp,
32 + unsigned int nCmd, unsigned long nArgument);
34 static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table);
38 IFX_char_t *pRegDrvName = IFX_NULL;
41 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
42 if (tapi_fops.ioctl == IFX_NULL)
44 + if (tapi_fops.unlocked_ioctl == IFX_NULL)
48 tapi_fops.owner = THIS_MODULE;
50 tapi_fops.read = ifx_tapi_read;
51 tapi_fops.write = ifx_tapi_write;
52 tapi_fops.poll = ifx_tapi_poll;
53 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
54 tapi_fops.ioctl = ifx_tapi_ioctl;
56 + tapi_fops.unlocked_ioctl = ifx_tapi_ioctl;
58 tapi_fops.open = ifx_tapi_open;
59 tapi_fops.release = ifx_tapi_release;
62 - 0 and positive values - success
63 - negative value - ioctl failed
65 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
66 static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
67 unsigned int nCmd, unsigned long nArg)
69 +static long ifx_tapi_ioctl(struct file *filp,
70 + unsigned int nCmd, unsigned long nArg)
73 TAPI_FD_PRIV_DATA_t *pTapiPriv;
74 IFX_TAPI_ioctlCtx_t ctx;
76 kernel lock (lock_kernel()). The lock must be
77 grabbed before changing the terminate
78 flag and released after the down() call. */
80 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
84 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
85 kill_proc(pThrCntrl->tid, SIGKILL, 1);
86 @@ -3729,8 +3753,10 @@
87 kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
89 /* release the big kernel lock */
90 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
92 - wait_for_completion (&pThrCntrl->thrCompletion);
94 + wait_for_completion (&pThrCntrl->thrCompletion);
96 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
97 /* Now we are sure the thread is in zombie state.
98 --- a/src/lib/lib_fifo/lib_fifo.c
99 +++ b/src/lib/lib_fifo/lib_fifo.c
102 /* if linux/slab.h is not available, use the precessor linux/malloc.h */
103 #include <linux/slab.h>
105 +#elif defined(VXWORKS)
106 #include <sys_drv_debug.h>