[PATCH] Mark struct super_operations const
[powerpc.git] / include / media / v4l2-dev.h
index 600d61d..fb96472 100644 (file)
@@ -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 <linux/poll.h>
 #include <linux/fs.h>
@@ -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 <linux/mm.h>
 
-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 */