aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-10-18 12:39:53 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:31:25 -0400
commitd5fbf32f381ad841d9d9537aa1b6f74796703361 (patch)
tree48149c1f8ace4aae98fb6a8473309cad39da44c9
parentf496bc716613378f2a3f9097a8e3ea4e4e30e79d (diff)
V4L/DVB (9324): v4l2: add video_ioctl2_unlocked for unlocked_ioctl support.
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>
-rw-r--r--drivers/media/video/v4l2-ioctl.c11
-rw-r--r--include/media/v4l2-ioctl.h4
2 files changed, 12 insertions, 3 deletions
diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c
index 155c9d77a463..0417844d4079 100644
--- a/drivers/media/video/v4l2-ioctl.c
+++ b/drivers/media/video/v4l2-ioctl.c
@@ -630,8 +630,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
630{ 630{
631 struct video_device *vfd = video_devdata(file); 631 struct video_device *vfd = video_devdata(file);
632 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; 632 const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
633 void *fh = file->private_data; 633 void *fh = file->private_data;
634 int ret = -EINVAL; 634 int ret = -EINVAL;
635 635
636 if ((vfd->debug & V4L2_DEBUG_IOCTL) && 636 if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
637 !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) { 637 !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
@@ -1861,3 +1861,10 @@ out:
1861 return err; 1861 return err;
1862} 1862}
1863EXPORT_SYMBOL(video_ioctl2); 1863EXPORT_SYMBOL(video_ioctl2);
1864
1865long video_ioctl2_unlocked(struct file *file,
1866 unsigned int cmd, unsigned long arg)
1867{
1868 return video_ioctl2(file->f_path.dentry->d_inode, file, cmd, arg);
1869}
1870EXPORT_SYMBOL(video_ioctl2_unlocked);
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 0bef03add796..3e11dfe38dc3 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -285,7 +285,9 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
285 unsigned long arg); 285 unsigned long arg);
286 286
287extern int video_ioctl2(struct inode *inode, struct file *file, 287extern int video_ioctl2(struct inode *inode, struct file *file,
288 unsigned int cmd, unsigned long arg); 288 unsigned int cmd, unsigned long arg);
289extern long video_ioctl2_unlocked(struct file *file,
290 unsigned int cmd, unsigned long arg);
289 291
290/* Include support for obsoleted stuff */ 292/* Include support for obsoleted stuff */
291extern int video_usercopy(struct inode *inode, struct file *file, 293extern int video_usercopy(struct inode *inode, struct file *file,