summaryrefslogtreecommitdiff
path: root/package/ltq-tapi/patches
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2011-03-14 07:34:08 +0000
committerJohn Crispin <john@openwrt.org>2011-03-14 07:34:08 +0000
commitcd3ff0e45c7b7786926b1e20c953551238e9d3b7 (patch)
tree45e6971439ad7c920ee0150f549dd0278b6b60ab /package/ltq-tapi/patches
parentba3251a90d93e7b5d30a95a30f250ec6a7b08cf1 (diff)
downloadmtk-20170518-cd3ff0e45c7b7786926b1e20c953551238e9d3b7.zip
mtk-20170518-cd3ff0e45c7b7786926b1e20c953551238e9d3b7.tar.gz
mtk-20170518-cd3ff0e45c7b7786926b1e20c953551238e9d3b7.tar.bz2
* fixes .unlocked_ioctl functions
SVN-Revision: 26158
Diffstat (limited to 'package/ltq-tapi/patches')
-rw-r--r--package/ltq-tapi/patches/linux-37.patch42
1 files changed, 38 insertions, 4 deletions
diff --git a/package/ltq-tapi/patches/linux-37.patch b/package/ltq-tapi/patches/linux-37.patch
index 6266ca1..5d5ff7e 100644
--- a/package/ltq-tapi/patches/linux-37.patch
+++ b/package/ltq-tapi/patches/linux-37.patch
@@ -1,23 +1,57 @@
--- a/src/drv_tapi_linux.c
+++ b/src/drv_tapi_linux.c
-@@ -213,7 +213,7 @@
+@@ -128,8 +128,13 @@
+ size_t count, loff_t * ppos);
+ static ssize_t ifx_tapi_read(struct file * filp, char *buf,
+ size_t length, loff_t * ppos);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
+ static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
+ unsigned int nCmd, unsigned long nArgument);
++#else
++static int ifx_tapi_ioctl(struct file *filp,
++ unsigned int nCmd, unsigned long nArgument);
++#endif
+ static unsigned int ifx_tapi_poll (struct file *filp, poll_table *table);
+
+ #ifdef CONFIG_PROC_FS
+@@ -213,7 +218,11 @@
IFX_char_t *pRegDrvName = IFX_NULL;
IFX_int32_t ret = 0;
-- if (tapi_fops.ioctl == IFX_NULL)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
+ if (tapi_fops.ioctl == IFX_NULL)
++#else
+ if (tapi_fops.unlocked_ioctl == IFX_NULL)
++#endif
{
#ifdef MODULE
tapi_fops.owner = THIS_MODULE;
-@@ -221,7 +221,7 @@
+@@ -221,7 +230,11 @@
tapi_fops.read = ifx_tapi_read;
tapi_fops.write = ifx_tapi_write;
tapi_fops.poll = ifx_tapi_poll;
-- tapi_fops.ioctl = ifx_tapi_ioctl;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
+ tapi_fops.ioctl = ifx_tapi_ioctl;
++#else
+ tapi_fops.unlocked_ioctl = ifx_tapi_ioctl;
++#endif
tapi_fops.open = ifx_tapi_open;
tapi_fops.release = ifx_tapi_release;
}
+@@ -876,8 +889,13 @@
+ - 0 and positive values - success
+ - negative value - ioctl failed
+ */
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
+ static int ifx_tapi_ioctl(struct inode *inode, struct file *filp,
+ unsigned int nCmd, unsigned long nArg)
++#else
++static int ifx_tapi_ioctl(struct file *filp,
++ unsigned int nCmd, unsigned long nArg)
++#endif
+ {
+ TAPI_FD_PRIV_DATA_t *pTapiPriv;
+ IFX_TAPI_ioctlCtx_t ctx;
--- a/src/lib/lib_fifo/lib_fifo.c
+++ b/src/lib/lib_fifo/lib_fifo.c
@@ -41,7 +41,7 @@