Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[firefly-linux-kernel-4.4.55.git] / include / media / saa7146_vv.h
index 7f61645a1c7b299595701db3186148f26b627963..944ecdf3530fc6ef28329465375931e9866f02fe 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <media/v4l2-common.h>
 #include <media/v4l2-ioctl.h>
+#include <media/v4l2-fh.h>
 #include <media/saa7146.h>
 #include <media/videobuf-dma-sg.h>
 
@@ -84,17 +85,15 @@ struct saa7146_overlay {
 
 /* per open data */
 struct saa7146_fh {
+       /* Must be the first field! */
+       struct v4l2_fh          fh;
        struct saa7146_dev      *dev;
-       /* if this is a vbi or capture open */
-       enum v4l2_buf_type      type;
 
        /* video capture */
        struct videobuf_queue   video_q;
 
        /* vbi capture */
        struct videobuf_queue   vbi_q;
-       struct v4l2_vbi_format  vbi_fmt;
-       struct timer_list       vbi_read_timeout;
 
        unsigned int resources; /* resource management for device open */
 };
@@ -105,7 +104,9 @@ struct saa7146_fh {
 struct saa7146_vv
 {
        /* vbi capture */
-       struct saa7146_dmaqueue         vbi_q;
+       struct saa7146_dmaqueue         vbi_dmaq;
+       struct v4l2_vbi_format          vbi_fmt;
+       struct timer_list               vbi_read_timeout;
        /* vbi workaround interrupt queue */
        wait_queue_head_t               vbi_wq;
        int                             vbi_fieldcount;
@@ -121,7 +122,7 @@ struct saa7146_vv
        struct saa7146_fh               *ov_suspend;
 
        /* video capture */
-       struct saa7146_dmaqueue         video_q;
+       struct saa7146_dmaqueue         video_dmaq;
        struct v4l2_pix_format          video_fmt;
        enum v4l2_field                 last_field;
 
@@ -160,7 +161,8 @@ struct saa7146_ext_vv
        int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *);
 
        /* the extension can override this */
-       struct v4l2_ioctl_ops ops;
+       struct v4l2_ioctl_ops vid_ops;
+       struct v4l2_ioctl_ops vbi_ops;
        /* pointer to the saa7146 core ops */
        const struct v4l2_ioctl_ops *core_ops;
 
@@ -199,6 +201,7 @@ void saa7146_set_gpio(struct saa7146_dev *saa, u8 pin, u8 data);
 
 /* from saa7146_video.c */
 extern const struct v4l2_ioctl_ops saa7146_video_ioctl_ops;
+extern const struct v4l2_ioctl_ops saa7146_vbi_ioctl_ops;
 extern struct saa7146_use_ops saa7146_video_uops;
 int saa7146_start_preview(struct saa7146_fh *fh);
 int saa7146_stop_preview(struct saa7146_fh *fh);