X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fmedia%2Fv4l2-dev.h;h=fb96472a1bd38423c4a3ac0790fb14b78064a28e;hb=e1036502e5263851259d147771226161e5ccc85a;hp=600d61d7d2ab8e190b1c8a763cd6f107efa20d7d;hpb=ca412cc992c3226239dd3bf896681bbf30e1b444;p=linux-2.6-omap-h63xx.git diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 600d61d7d2a..fb96472a1bd 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -9,7 +9,8 @@ #ifndef _V4L2_DEV_H #define _V4L2_DEV_H -#define OBSOLETE_OWNER 1 /* to be removed soon */ +#define OBSOLETE_OWNER 1 /* to be removed soon */ +#define OBSOLETE_DEVDATA 1 /* to be removed soon */ #include #include @@ -42,6 +43,7 @@ /* Video standard functions */ extern unsigned int v4l2_video_std_fps(struct v4l2_standard *vs); +extern char *v4l2_norm_to_name(v4l2_std_id id); extern int v4l2_video_std_construct(struct v4l2_standard *vs, int id, char *name); @@ -80,12 +82,6 @@ extern long v4l_compat_ioctl32(struct file *file, unsigned int cmd, * This version moves redundant code from video device code to * the common handler */ -struct v4l2_tvnorm { - char *name; - v4l2_std_id id; - - void *priv_data; -}; struct video_device { @@ -103,9 +99,8 @@ struct video_device int debug; /* Activates debug level*/ /* Video standard vars */ - int tvnormsize; /* Size of tvnorm array */ - v4l2_std_id current_norm; /* Current tvnorm */ - struct v4l2_tvnorm *tvnorms; + v4l2_std_id tvnorms; /* Supported tv norms */ + v4l2_std_id current_norm; /* Current tvnorm */ /* callbacks */ void (*release)(struct video_device *vfd); @@ -194,7 +189,7 @@ struct video_device int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); -#ifdef HAVE_V4L1 +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* buffer type is struct vidio_mbuf * */ int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); #endif @@ -210,7 +205,7 @@ struct video_device /* Standard handling G_STD and ENUMSTD are handled by videodev.c */ - int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id a); + int (*vidioc_s_std) (struct file *file, void *fh, v4l2_std_id *norm); int (*vidioc_querystd) (struct file *file, void *fh, v4l2_std_id *a); /* Input handling */ @@ -335,13 +330,11 @@ extern int video_usercopy(struct inode *inode, struct file *file, unsigned int cmd, void *arg)); -#ifdef HAVE_V4L1 +#ifdef CONFIG_VIDEO_V4L1_COMPAT #include -extern struct video_device* video_devdata(struct file*); - #define to_video_device(cd) container_of(cd, struct video_device, class_dev) -static inline int +static inline int __must_check video_device_create_file(struct video_device *vfd, struct class_device_attribute *attr) { @@ -357,6 +350,8 @@ video_device_remove_file(struct video_device *vfd, class_device_remove_file(&vfd->class_dev, attr); } +#endif /* CONFIG_VIDEO_V4L1_COMPAT */ + #ifdef OBSOLETE_OWNER /* to be removed soon */ /* helper functions to access driver private data. */ static inline void *video_get_drvdata(struct video_device *dev) @@ -368,10 +363,14 @@ static inline void video_set_drvdata(struct video_device *dev, void *data) { dev->priv = data; } + #endif +#ifdef OBSOLETE_DEVDATA /* to be removed soon */ +/* Obsolete stuff - Still needed for radio devices and obsolete drivers */ +extern struct video_device* video_devdata(struct file*); extern int video_exclusive_open(struct inode *inode, struct file *file); extern int video_exclusive_release(struct inode *inode, struct file *file); -#endif /* HAVE_V4L1 */ +#endif #endif /* _V4L2_DEV_H */