提交 d5fbf32f 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

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: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 f496bc71
...@@ -630,8 +630,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ...@@ -630,8 +630,8 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
{ {
struct video_device *vfd = video_devdata(file); struct video_device *vfd = video_devdata(file);
const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops; const struct v4l2_ioctl_ops *ops = vfd->ioctl_ops;
void *fh = file->private_data; void *fh = file->private_data;
int ret = -EINVAL; int ret = -EINVAL;
if ((vfd->debug & V4L2_DEBUG_IOCTL) && if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
!(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) { !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
...@@ -1861,3 +1861,10 @@ int video_ioctl2(struct inode *inode, struct file *file, ...@@ -1861,3 +1861,10 @@ int video_ioctl2(struct inode *inode, struct file *file,
return err; return err;
} }
EXPORT_SYMBOL(video_ioctl2); 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);
...@@ -285,7 +285,9 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, ...@@ -285,7 +285,9 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd,
unsigned long arg); unsigned long arg);
extern int video_ioctl2(struct inode *inode, struct file *file, 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 */ /* Include support for obsoleted stuff */
extern int video_usercopy(struct inode *inode, struct file *file, extern int video_usercopy(struct inode *inode, struct file *file,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册