summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-10-18 18:39:53 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-10-18 18:39:53 +0200
commit90a1ccb93b663837f6e2dbed7762ca08d94fc493 (patch)
tree5a17dc4ee309ba7d652be8aee9e6b64f6515028a
parentedeea60fc1ac550b011e8fe6d2e720ece1f38990 (diff)
downloadmediapointer-dvb-s2-90a1ccb93b663837f6e2dbed7762ca08d94fc493.tar.gz
mediapointer-dvb-s2-90a1ccb93b663837f6e2dbed7762ca08d94fc493.tar.bz2
v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.
From: Hans Verkuil <hverkuil@xs4all.nl> Based on an older patch from Sakari Ailus. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> CC: Sakari Ailus <sakari.ailus@nokia.com>
-rw-r--r--linux/drivers/media/video/v4l2-ioctl.c15
-rw-r--r--linux/include/media/v4l2-ioctl.h4
2 files changed, 16 insertions, 3 deletions
diff --git a/linux/drivers/media/video/v4l2-ioctl.c b/linux/drivers/media/video/v4l2-ioctl.c
index 3a68d6e35..871447bdd 100644
--- a/linux/drivers/media/video/v4l2-ioctl.c
+++ b/linux/drivers/media/video/v4l2-ioctl.c
@@ -631,8 +631,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
{
struct video_device *vfd = video_devdata(file);
const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
- void *fh = file->private_data;
- int ret = -EINVAL;
+ void *fh = file->private_data;
+ int ret = -EINVAL;
if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
!(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
@@ -1862,3 +1862,14 @@ out:
return err;
}
EXPORT_SYMBOL(video_ioctl2);
+
+long video_ioctl2_unlocked(struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
+ return video_ioctl2(file->f_dentry->d_inode, file, cmd, arg);
+#else
+ return video_ioctl2(file->f_path.dentry->d_inode, file, cmd, arg);
+#endif
+}
+EXPORT_SYMBOL(video_ioctl2_unlocked);
diff --git a/linux/include/media/v4l2-ioctl.h b/linux/include/media/v4l2-ioctl.h
index 0bef03add..3e11dfe38 100644
--- a/linux/include/media/v4l2-ioctl.h
+++ b/linux/include/media/v4l2-ioctl.h
@@ -285,7 +285,9 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
unsigned long arg);
extern int video_ioctl2(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg);
+ unsigned int cmd, unsigned long arg);
+extern long video_ioctl2_unlocked(struct file *file,
+ unsigned int cmd, unsigned long arg);
/* Include support for obsoleted stuff */
extern int video_usercopy(struct inode *inode, struct file *file,