summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/video-buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/video-buf.c')
-rw-r--r--linux/drivers/media/video/video-buf.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index bf132faef..bedf09b4c 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -5,10 +5,10 @@
* The functions expect the hardware being able to scatter gatter
* (i.e. the buffers are not linear in physical memory, but fragmented
* into PAGE_SIZE chunks). They also assume the driver does not need
- * to touch the video data (thus it is probably not useful for USB as
- * data often must be uncompressed by the drivers).
+ * to touch the video data (thus it is probably not useful for USB 1.1
+ * as data often must be uncompressed by the drivers).
*
- * (c) 2001,02 Gerd Knorr <kraxel@bytesex.org>
+ * (c) 2001-2004 Gerd Knorr <kraxel@bytesex.org> [SUSE Labs]
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -119,6 +119,12 @@ videobuf_pages_to_sg(struct page **pages, int nr_pages, int offset)
/* --------------------------------------------------------------------- */
+void videobuf_dma_init(struct videobuf_dmabuf *dma)
+{
+ memset(dma,0,sizeof(*dma));
+ dma->magic = MAGIC_DMABUF;
+}
+
int videobuf_dma_init_user(struct videobuf_dmabuf *dma, int direction,
unsigned long data, unsigned long size)
{
@@ -275,9 +281,9 @@ void* videobuf_alloc(unsigned int size)
vb = kmalloc(size,GFP_KERNEL);
if (NULL != vb) {
memset(vb,0,size);
+ videobuf_dma_init(&vb->dma);
init_waitqueue_head(&vb->done);
vb->magic = MAGIC_BUFFER;
- vb->dma.magic = MAGIC_DMABUF;
}
return vb;
}
@@ -1235,6 +1241,7 @@ int videobuf_mmap_mapper(struct vm_area_struct *vma,
EXPORT_SYMBOL_GPL(videobuf_vmalloc_to_sg);
+EXPORT_SYMBOL_GPL(videobuf_dma_init);
EXPORT_SYMBOL_GPL(videobuf_dma_init_user);
EXPORT_SYMBOL_GPL(videobuf_dma_init_kernel);
EXPORT_SYMBOL_GPL(videobuf_dma_init_overlay);