From 472af2b05bdefcaee7e754e22cbf131110017ad6 Mon Sep 17 00:00:00 2001 From: Pawel Osciak Date: Mon, 14 Mar 2011 10:38:24 -0300 Subject: [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t dma_addr_t may not fit into void* on some architectures. To be safe, make vb2_dma_contig_cookie() return a pointer to dma_addr_t and dereference it in vb2_dma_contig_plane_paddr() back to dma_addr_t. Signed-off-by: Pawel Osciak Reported-by: Hans Verkuil Signed-off-by: Guennadi Liakhovetski Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/videobuf2-dma-contig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/video') diff --git a/drivers/media/video/videobuf2-dma-contig.c b/drivers/media/video/videobuf2-dma-contig.c index 90495b7b4ddf..58205d596138 100644 --- a/drivers/media/video/videobuf2-dma-contig.c +++ b/drivers/media/video/videobuf2-dma-contig.c @@ -78,7 +78,7 @@ static void *vb2_dma_contig_cookie(void *buf_priv) { struct vb2_dc_buf *buf = buf_priv; - return (void *)buf->paddr; + return &buf->paddr; } static void *vb2_dma_contig_vaddr(void *buf_priv) -- cgit v1.2.3