From 9bb0976b93978009b15477a0809c54f5e6fe8594 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 21 Oct 2008 12:58:39 -0200 Subject: Remove unused inode parameter from video_ioctl2 From: Mauro Carvalho Chehab inode is never used on video_ioctl2. Remove it and rename the function to __video_ioctl2. This allows its usage directly as a callback at fops.unlocked_ioctl. Since we still need a callback with inode to be used with fops.ioctl, this patch adds video_ioctl2() that is just a call to __video_ioctl2(). Also, this patch adds some comments about video_ioctl2 and __video_ioctl2 usage at v4l2-ioctl.h. Priority: normal Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/v4l2-ioctl.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'linux/drivers/media/video/v4l2-ioctl.c') diff --git a/linux/drivers/media/video/v4l2-ioctl.c b/linux/drivers/media/video/v4l2-ioctl.c index 301000661..a6f76c960 100644 --- a/linux/drivers/media/video/v4l2-ioctl.c +++ b/linux/drivers/media/video/v4l2-ioctl.c @@ -1769,7 +1769,7 @@ static int __video_do_ioctl(struct file *file, return ret; } -int video_ioctl2(struct inode *inode, struct file *file, +int __video_ioctl2(struct file *file, unsigned int cmd, unsigned long arg) { char sbuf[128]; @@ -1861,15 +1861,11 @@ out: kfree(mbuf); return err; } -EXPORT_SYMBOL(video_ioctl2); +EXPORT_SYMBOL(__video_ioctl2); -long video_ioctl2_unlocked(struct file *file, - unsigned int cmd, unsigned long arg) +int video_ioctl2(struct inode *inode, 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 + return __video_ioctl2(file, cmd, arg); } -EXPORT_SYMBOL(video_ioctl2_unlocked); +EXPORT_SYMBOL(video_ioctl2); -- cgit v1.2.3