aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujoy Gupta <sujoy@google.com>2006-09-30 05:55:29 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-10-03 14:14:48 -0400
commit6eb32a792ec19816d68529805f8169ce3ba1b1a2 (patch)
tree96eedab826e7c73ebbc6705ef1dd4c5e3c030b0b /drivers
parentf1db955acbda253051a3256708d0dbfec2781de2 (diff)
V4L/DVB (4685): Fix compiler warning in drivers/media/video/video-buf.c
Using a double cast to avoid compiler warnings when building for PAE. Compiler doesn't like direct casting of a 32 bit ptr to 64 bit integer. Signed-off-by: Martin J. Bligh <mbligh@google.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-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);