X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fmedia%2Fv4l2-dev.h;fp=include%2Fmedia%2Fv4l2-dev.h;h=fb96472a1bd38423c4a3ac0790fb14b78064a28e;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=810462f8a374b63ac3096414ada7b9aff6d5732d;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 810462f8a..fb96472a1 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); @@ -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 */ @@ -338,10 +333,8 @@ extern int video_usercopy(struct inode *inode, struct file *file, #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) { @@ -370,9 +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 #endif /* _V4L2_DEV_H */