X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fmedia%2Fv4l2-ioctl.h;h=e6ba25b3d7c8bd345b5c5c30732f2c4f78d59f5a;hb=fed4d59b6ec5481caceb17863f19a0b0e5eaa939;hp=0bef03add7968c1b26053be42b52ffbc5da132d3;hpb=2502991560dc8244dbe10e48473d85722c1e2ec1;p=linux-2.6-omap-h63xx.git diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index 0bef03add79..e6ba25b3d7c 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -271,26 +271,38 @@ extern const char *v4l2_field_names[]; extern const char *v4l2_type_names[]; /* Compatibility layer interface -- v4l1-compat module */ -typedef int (*v4l2_kioctl)(struct inode *inode, struct file *file, +typedef int (*v4l2_kioctl)(struct file *file, unsigned int cmd, void *arg); #ifdef CONFIG_VIDEO_V4L1_COMPAT -int v4l_compat_translate_ioctl(struct inode *inode, struct file *file, +int v4l_compat_translate_ioctl(struct file *file, int cmd, void *arg, v4l2_kioctl driver_ioctl); #else -#define v4l_compat_translate_ioctl(inode, file, cmd, arg, ioctl) (-EINVAL) +#define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) #endif /* 32 Bits compatibility layer for 64 bits processors */ 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); - /* 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 */