V4L/DVB (12595): common/ir: use a struct for keycode tables
[safe/jmp/linux-2.6] / include / media / saa7146_vv.h
index 50e33b0..eed5fcc 100644 (file)
@@ -1,10 +1,10 @@
 #ifndef __SAA7146_VV__
 #define __SAA7146_VV__
 
-#include <linux/videodev.h>
 #include <media/v4l2-common.h>
+#include <media/v4l2-ioctl.h>
 #include <media/saa7146.h>
-#include <media/video-buf.h>
+#include <media/videobuf-dma-sg.h>
 
 #define MAX_SAA7146_CAPTURE_BUFFERS    32      /* arbitrary */
 #define BUFFER_TIMEOUT     (HZ/2)  /* 0.5 seconds */
@@ -150,16 +150,6 @@ struct saa7146_vv
        unsigned int resources; /* resource management for device */
 };
 
-#define SAA7146_EXCLUSIVE      0x1
-#define SAA7146_BEFORE         0x2
-#define SAA7146_AFTER          0x4
-
-struct saa7146_extension_ioctls
-{
-       unsigned int    cmd;
-       int             flags;
-};
-
 /* flags */
 #define SAA7146_USE_PORT_B_FOR_VBI     0x2     /* use input port b for vbi hardware bug workaround */
 
@@ -176,10 +166,12 @@ struct saa7146_ext_vv
        int num_stds;
        int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *);
 
-       struct saa7146_extension_ioctls *ioctls;
-       int (*ioctl)(struct saa7146_fh*, unsigned int cmd, void *arg);
+       /* the extension can override this */
+       struct v4l2_ioctl_ops ops;
+       /* pointer to the saa7146 core ops */
+       const struct v4l2_ioctl_ops *core_ops;
 
-       struct file_operations vbi_fops;
+       struct v4l2_file_operations vbi_fops;
 };
 
 struct saa7146_use_ops  {
@@ -213,9 +205,11 @@ void saa7146_set_hps_source_and_sync(struct saa7146_dev *saa, int source, int sy
 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 struct saa7146_use_ops saa7146_video_uops;
 int saa7146_start_preview(struct saa7146_fh *fh);
 int saa7146_stop_preview(struct saa7146_fh *fh);
+long saa7146_video_do_ioctl(struct file *file, unsigned int cmd, void *arg);
 
 /* from saa7146_vbi.c */
 extern struct saa7146_use_ops saa7146_vbi_uops;