aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-04-13 14:10:00 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:39 -0400
commit59d3448995a4c0ca98cbe82f6dac9460323377c1 (patch)
treefe6029dc9e66a4101b8e4e985ff9175a1735e14f /include/media
parent3b5fa928a6b2971ec65571745defc5d9758b4bc1 (diff)
V4L/DVB (7566): videobuf-dvb: allow its usage with videobuf-vmalloc
videobuf-dvb were still using a function that were videobuf-dma-sg dependent. This patch creates a generic handler for this function. This way, videobuf-dvb can now work with all videobuf implementations. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/videobuf-core.h18
-rw-r--r--include/media/videobuf-vmalloc.h4
2 files changed, 14 insertions, 8 deletions
diff --git a/include/media/videobuf-core.h b/include/media/videobuf-core.h
index 377a6c6e931..5b39a22533f 100644
--- a/include/media/videobuf-core.h
+++ b/include/media/videobuf-core.h
@@ -13,6 +13,9 @@
13 * the Free Software Foundation; either version 2 13 * the Free Software Foundation; either version 2
14 */ 14 */
15 15
16#ifndef _VIDEOBUF_CORE_H
17#define _VIDEOBUF_CORE_H
18
16#include <linux/poll.h> 19#include <linux/poll.h>
17#ifdef CONFIG_VIDEO_V4L1_COMPAT 20#ifdef CONFIG_VIDEO_V4L1_COMPAT
18#include <linux/videodev.h> 21#include <linux/videodev.h>
@@ -123,7 +126,8 @@ struct videobuf_queue_ops {
123struct videobuf_qtype_ops { 126struct videobuf_qtype_ops {
124 u32 magic; 127 u32 magic;
125 128
126 void* (*alloc) (size_t size); 129 void *(*alloc) (size_t size);
130 void *(*vmalloc) (struct videobuf_buffer *buf);
127 int (*iolock) (struct videobuf_queue* q, 131 int (*iolock) (struct videobuf_queue* q,
128 struct videobuf_buffer *vb, 132 struct videobuf_buffer *vb,
129 struct v4l2_framebuffer *fbuf); 133 struct v4l2_framebuffer *fbuf);
@@ -185,6 +189,10 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
185 189
186void *videobuf_alloc(struct videobuf_queue* q); 190void *videobuf_alloc(struct videobuf_queue* q);
187 191
192/* Used on videobuf-dvb */
193void *videobuf_queue_to_vmalloc (struct videobuf_queue* q,
194 struct videobuf_buffer *buf);
195
188void videobuf_queue_core_init(struct videobuf_queue *q, 196void videobuf_queue_core_init(struct videobuf_queue *q,
189 struct videobuf_queue_ops *ops, 197 struct videobuf_queue_ops *ops,
190 struct device *dev, 198 struct device *dev,
@@ -233,10 +241,4 @@ int videobuf_mmap_free(struct videobuf_queue *q);
233int videobuf_mmap_mapper(struct videobuf_queue *q, 241int videobuf_mmap_mapper(struct videobuf_queue *q,
234 struct vm_area_struct *vma); 242 struct vm_area_struct *vma);
235 243
236/* --------------------------------------------------------------------- */ 244#endif
237
238/*
239 * Local variables:
240 * c-basic-offset: 8
241 * End:
242 */
diff --git a/include/media/videobuf-vmalloc.h b/include/media/videobuf-vmalloc.h
index ec63ab0fab9..aed39460c15 100644
--- a/include/media/videobuf-vmalloc.h
+++ b/include/media/videobuf-vmalloc.h
@@ -12,6 +12,8 @@
12 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 13 * the Free Software Foundation; either version 2
14 */ 14 */
15#ifndef _VIDEOBUF_VMALLOC_H
16#define _VIDEOBUF_VMALLOC_H
15 17
16#include <media/videobuf-core.h> 18#include <media/videobuf-core.h>
17 19
@@ -39,3 +41,5 @@ void videobuf_queue_vmalloc_init(struct videobuf_queue* q,
39void *videobuf_to_vmalloc (struct videobuf_buffer *buf); 41void *videobuf_to_vmalloc (struct videobuf_buffer *buf);
40 42
41void videobuf_vmalloc_free (struct videobuf_buffer *buf); 43void videobuf_vmalloc_free (struct videobuf_buffer *buf);
44
45#endif