Skip to content

Commit

Permalink
V4L/DVB (4685): Fix compiler warning in drivers/media/video/video-buf.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sujoy Gupta authored and Mauro Carvalho Chehab committed Oct 3, 2006
1 parent f1db955 commit 6eb32a7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/media/video/video-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,12 @@ videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
if (NULL == fbuf)
return -EINVAL;
/* FIXME: need sanity checks for vb->boff */
bus = (dma_addr_t)fbuf->base + vb->boff;
/*
* 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.
*/
bus = (dma_addr_t)(unsigned long)fbuf->base + vb->boff;
pages = PAGE_ALIGN(vb->size) >> PAGE_SHIFT;
err = videobuf_dma_init_overlay(&vb->dma,PCI_DMA_FROMDEVICE,
bus, pages);
Expand Down

0 comments on commit 6eb32a7

Please sign in to comment.