X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;f=include%2Fmedia%2Fv4l2-ioctl.h;h=7a4529defa8841ffa606d8af52d2dac289e5de29;hb=868f985c2fb85b5f32785bb55a349d180a30f3d3;hp=e6ba25b3d7c8bd345b5c5c30732f2c4f78d59f5a;hpb=8a522c916d3c3b29a38bd3c8fc3df826d22a9444;p=safe%2Fjmp%2Flinux-2.6 diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index e6ba25b..7a4529d 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -15,6 +15,7 @@ #include #include /* need __user */ #ifdef CONFIG_VIDEO_V4L1_COMPAT +#define __MIN_V4L1 #include #else #include @@ -225,15 +226,21 @@ struct v4l2_ioctl_ops { /* Debugging ioctls */ #ifdef CONFIG_VIDEO_ADV_DEBUG int (*vidioc_g_register) (struct file *file, void *fh, - struct v4l2_register *reg); + struct v4l2_dbg_register *reg); int (*vidioc_s_register) (struct file *file, void *fh, - struct v4l2_register *reg); + struct v4l2_dbg_register *reg); #endif int (*vidioc_g_chip_ident) (struct file *file, void *fh, - struct v4l2_chip_ident *chip); + struct v4l2_dbg_chip_ident *chip); + + int (*vidioc_enum_framesizes) (struct file *file, void *fh, + struct v4l2_frmsizeenum *fsize); + + int (*vidioc_enum_frameintervals) (struct file *file, void *fh, + struct v4l2_frmivalenum *fival); /* For other private ioctls */ - int (*vidioc_default) (struct file *file, void *fh, + long (*vidioc_default) (struct file *file, void *fh, int cmd, void *arg); }; @@ -261,6 +268,7 @@ struct v4l2_ioctl_ops { /* Video standard functions */ extern const char *v4l2_norm_to_name(v4l2_std_id id); +extern void v4l2_video_std_frame_period(int id, struct v4l2_fract *frameperiod); extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id, const char *name); /* Prints the ioctl in a human-readable format */ @@ -271,38 +279,27 @@ extern const char *v4l2_field_names[]; extern const char *v4l2_type_names[]; /* Compatibility layer interface -- v4l1-compat module */ -typedef int (*v4l2_kioctl)(struct file *file, +typedef long (*v4l2_kioctl)(struct file *file, unsigned int cmd, void *arg); #ifdef CONFIG_VIDEO_V4L1_COMPAT -int v4l_compat_translate_ioctl(struct file *file, +long v4l_compat_translate_ioctl(struct file *file, int cmd, void *arg, v4l2_kioctl driver_ioctl); #else #define v4l_compat_translate_ioctl(file, cmd, arg, ioctl) (-EINVAL) #endif +#ifdef CONFIG_COMPAT /* 32 Bits compatibility layer for 64 bits processors */ -extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, +extern long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg); +#endif /* 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)); +extern long video_usercopy(struct file *file, unsigned int cmd, + unsigned long arg, v4l2_kioctl func); /* 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, +extern long video_ioctl2(struct file *file, unsigned int cmd, unsigned long arg); #endif /* _V4L2_IOCTL_H */