V4L/DVB: ir-core: Add callbacks for input/evdev open/close on IR core
[safe/jmp/linux-2.6] / include / media / videobuf-core.h
index 5b39a22..b1f7bf4 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/poll.h>
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
+#define __MIN_V4L1
 #include <linux/videodev.h>
 #endif
 #include <linux/videodev2.h>
@@ -128,14 +129,14 @@ struct videobuf_qtype_ops {
 
        void *(*alloc)          (size_t size);
        void *(*vmalloc)        (struct videobuf_buffer *buf);
-       int (*iolock)           (struct videobuf_queueq,
+       int (*iolock)           (struct videobuf_queue *q,
                                 struct videobuf_buffer *vb,
                                 struct v4l2_framebuffer *fbuf);
        int (*mmap)             (struct videobuf_queue *q,
                                 unsigned int *count,
                                 unsigned int *size,
                                 enum v4l2_memory memory);
-       int (*sync)             (struct videobuf_queueq,
+       int (*sync)             (struct videobuf_queue *q,
                                 struct videobuf_buffer *buf);
        int (*video_copy_to_user)(struct videobuf_queue *q,
                                 char __user *data,
@@ -165,7 +166,7 @@ struct videobuf_queue {
        enum v4l2_field            field;
        enum v4l2_field            last;   /* for field=V4L2_FIELD_ALTERNATE */
        struct videobuf_buffer     *bufs[VIDEO_MAX_FRAME];
-       struct videobuf_queue_ops  *ops;
+       const struct videobuf_queue_ops  *ops;
        struct videobuf_qtype_ops  *int_ops;
 
        unsigned int               streaming:1;
@@ -184,17 +185,17 @@ struct videobuf_queue {
 };
 
 int videobuf_waiton(struct videobuf_buffer *vb, int non_blocking, int intr);
-int videobuf_iolock(struct videobuf_queueq, struct videobuf_buffer *vb,
+int videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb,
                struct v4l2_framebuffer *fbuf);
 
 void *videobuf_alloc(struct videobuf_queue* q);
 
 /* Used on videobuf-dvb */
-void *videobuf_queue_to_vmalloc (struct videobuf_queue* q,
-                                struct videobuf_buffer *buf);
+void *videobuf_queue_to_vmalloc(struct videobuf_queue *q,
+                               struct videobuf_buffer *buf);
 
 void videobuf_queue_core_init(struct videobuf_queue *q,
-                        struct videobuf_queue_ops *ops,
+                        const struct videobuf_queue_ops *ops,
                         struct device *dev,
                         spinlock_t *irqlock,
                         enum v4l2_buf_type type,
@@ -237,6 +238,9 @@ unsigned int videobuf_poll_stream(struct file *file,
 int videobuf_mmap_setup(struct videobuf_queue *q,
                        unsigned int bcount, unsigned int bsize,
                        enum v4l2_memory memory);
+int __videobuf_mmap_setup(struct videobuf_queue *q,
+                       unsigned int bcount, unsigned int bsize,
+                       enum v4l2_memory memory);
 int videobuf_mmap_free(struct videobuf_queue *q);
 int videobuf_mmap_mapper(struct videobuf_queue *q,
                         struct vm_area_struct *vma);