summaryrefslogtreecommitdiff
path: root/linux/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:58:39 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 12:58:39 -0200
commit9bb0976b93978009b15477a0809c54f5e6fe8594 (patch)
tree345994c69b6efa50a71ad0c52fe097e856941304 /linux/include/media
parent04aa4b62d67d07cdb0a26eff8eb37482dea62b42 (diff)
downloadmediapointer-dvb-s2-9bb0976b93978009b15477a0809c54f5e6fe8594.tar.gz
mediapointer-dvb-s2-9bb0976b93978009b15477a0809c54f5e6fe8594.tar.bz2
Remove unused inode parameter from video_ioctl2
From: Mauro Carvalho Chehab <mchehab@redhat.com> 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 <mchehab@redhat.com>
Diffstat (limited to 'linux/include/media')
-rw-r--r--linux/include/media/v4l2-ioctl.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/linux/include/media/v4l2-ioctl.h b/linux/include/media/v4l2-ioctl.h
index 7a919433a..e6ba25b3d 100644
--- a/linux/include/media/v4l2-ioctl.h
+++ b/linux/include/media/v4l2-ioctl.h
@@ -284,15 +284,25 @@ int v4l_compat_translate_ioctl(struct file *file,
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);
-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,
unsigned int cmd, unsigned long arg,
int (*func)(struct inode *inode, struct file *file,
unsigned int cmd, void *arg));
+/* Standard handlers for V4L ioctl's */
+
+/* This prototype is used on fops.unlocked_ioctl */
+extern int __video_ioctl2(struct file *file,
+ unsigned int cmd, unsigned long arg);
+
+/* This prototype is used on fops.ioctl
+ * Since fops.ioctl enables Kernel Big Lock, it is preferred
+ * to use __video_ioctl2 instead.
+ * It should be noticed that there's no lock code inside
+ * video_ioctl2().
+ */
+extern int video_ioctl2(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg);
+
#endif /* _V4L2_IOCTL_H */