aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/video-buf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/video-buf.c b/drivers/media/video/video-buf.c
index acc5ea936687..f429f49901b9 100644
--- a/drivers/media/video/video-buf.c
+++ b/drivers/media/video/video-buf.c
@@ -365,7 +365,12 @@ videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
365 if (NULL == fbuf) 365 if (NULL == fbuf)
366 return -EINVAL; 366 return -EINVAL;
367 /* FIXME: need sanity checks for vb->boff */ 367 /* FIXME: need sanity checks for vb->boff */
368 bus = (dma_addr_t)fbuf->base + vb->boff; 368 /*
369 * Using a double cast to avoid compiler warnings when
370 * building for PAE. Compiler doesn't like direct casting
371 * of a 32 bit ptr to 64 bit integer.
372 */
373 bus = (dma_addr_t)(unsigned long)fbuf->base + vb->boff;
369 pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT; 374 pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT;
370 err = videobuf_dma_init_overlay(&vb->dma,PCI_DMA_FROMDEVICE, 375 err = videobuf_dma_init_overlay(&vb->dma,PCI_DMA_FROMDEVICE,
371 bus, pages); 376 bus, pages);