V4L/DVB (9324): v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.
authorHans Verkuil <hverkuil@xs4all.nl>
Sat, 18 Oct 2008 16:39:53 +0000 (13:39 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 Oct 2008 16:31:25 +0000 (14:31 -0200)
Based on an older patch from Sakari Ailus.

Cc: Sakari Ailus <sakari.ailus@nokia.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-ioctl.c
include/media/v4l2-ioctl.h

index 155c9d77a463531d43989b75e2505da632f901b2..0417844d407925bfb5969513a44cc2e841f381af 100644 (file)
@@ -630,8 +630,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)) {
@@ -1861,3 +1861,10 @@ out:
        return err;
 }
 EXPORT_SYMBOL(video_ioctl2);
+
+long video_ioctl2_unlocked(struct file *file,
+                unsigned int cmd, unsigned long arg)
+{
+       return video_ioctl2(file->f_path.dentry->d_inode, file, cmd, arg);
+}
+EXPORT_SYMBOL(video_ioctl2_unlocked);
index 0bef03add7968c1b26053be42b52ffbc5da132d3..3e11dfe38dc3234654463f1953b35bda70cc7591 100644 (file)
@@ -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,