aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-dma-sg.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-05-11 09:36:34 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:25:57 -0400
commitbb6dbe74806a17bcec8396c57ca7fd9a889e3b27 (patch)
tree853278c1d41fbf81cde3e72599f7eade46901276 /drivers/media/video/videobuf-dma-sg.c
parent959794ddc05ab6fbcd458bc093e7f0b92633d052 (diff)
V4L/DVB: videobuf: Rename vmalloc fields to vaddr
The videobuf_dmabuf and videobuf_vmalloc_memory fields have a vmalloc field to store the kernel virtual address of vmalloc'ed buffers. Rename the field to vaddr. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-dma-sg.c')
-rw-r--r--drivers/media/video/videobuf-dma-sg.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
index 2d64040594b8..06f9a9c2a39a 100644
--- a/drivers/media/video/videobuf-dma-sg.c
+++ b/drivers/media/video/videobuf-dma-sg.c
@@ -211,17 +211,17 @@ int videobuf_dma_init_kernel(struct videobuf_dmabuf *dma, int direction,
211 dprintk(1, "init kernel [%d pages]\n", nr_pages); 211 dprintk(1, "init kernel [%d pages]\n", nr_pages);
212 212
213 dma->direction = direction; 213 dma->direction = direction;
214 dma->vmalloc = vmalloc_32(nr_pages << PAGE_SHIFT); 214 dma->vaddr = vmalloc_32(nr_pages << PAGE_SHIFT);
215 if (NULL == dma->vmalloc) { 215 if (NULL == dma->vaddr) {
216 dprintk(1, "vmalloc_32(%d pages) failed\n", nr_pages); 216 dprintk(1, "vmalloc_32(%d pages) failed\n", nr_pages);
217 return -ENOMEM; 217 return -ENOMEM;
218 } 218 }
219 219
220 dprintk(1, "vmalloc is at addr 0x%08lx, size=%d\n", 220 dprintk(1, "vmalloc is at addr 0x%08lx, size=%d\n",
221 (unsigned long)dma->vmalloc, 221 (unsigned long)dma->vaddr,
222 nr_pages << PAGE_SHIFT); 222 nr_pages << PAGE_SHIFT);
223 223
224 memset(dma->vmalloc, 0, nr_pages << PAGE_SHIFT); 224 memset(dma->vaddr, 0, nr_pages << PAGE_SHIFT);
225 dma->nr_pages = nr_pages; 225 dma->nr_pages = nr_pages;
226 226
227 return 0; 227 return 0;
@@ -254,8 +254,8 @@ int videobuf_dma_map(struct device *dev, struct videobuf_dmabuf *dma)
254 dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages, 254 dma->sglist = videobuf_pages_to_sg(dma->pages, dma->nr_pages,
255 dma->offset); 255 dma->offset);
256 } 256 }
257 if (dma->vmalloc) { 257 if (dma->vaddr) {
258 dma->sglist = videobuf_vmalloc_to_sg(dma->vmalloc, 258 dma->sglist = videobuf_vmalloc_to_sg(dma->vaddr,
259 dma->nr_pages); 259 dma->nr_pages);
260 } 260 }
261 if (dma->bus_addr) { 261 if (dma->bus_addr) {
@@ -319,8 +319,8 @@ int videobuf_dma_free(struct videobuf_dmabuf *dma)
319 dma->pages = NULL; 319 dma->pages = NULL;
320 } 320 }
321 321
322 vfree(dma->vmalloc); 322 vfree(dma->vaddr);
323 dma->vmalloc = NULL; 323 dma->vaddr = NULL;
324 324
325 if (dma->bus_addr) 325 if (dma->bus_addr)
326 dma->bus_addr = 0; 326 dma->bus_addr = 0;
@@ -444,7 +444,7 @@ static void *__videobuf_to_vaddr(struct videobuf_buffer *buf)
444 444
445 MAGIC_CHECK(mem->magic, MAGIC_SG_MEM); 445 MAGIC_CHECK(mem->magic, MAGIC_SG_MEM);
446 446
447 return mem->dma.vmalloc; 447 return mem->dma.vaddr;
448} 448}
449 449
450static int __videobuf_iolock(struct videobuf_queue *q, 450static int __videobuf_iolock(struct videobuf_queue *q,