diff options
-rw-r--r-- | drivers/media/video/videobuf2-dma-contig.c | 2 | ||||
-rw-r--r-- | include/media/videobuf2-dma-contig.h | 9 |
2 files changed, 7 insertions, 4 deletions
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) | |||
78 | { | 78 | { |
79 | struct vb2_dc_buf *buf = buf_priv; | 79 | struct vb2_dc_buf *buf = buf_priv; |
80 | 80 | ||
81 | return (void *)buf->paddr; | 81 | return &buf->paddr; |
82 | } | 82 | } |
83 | 83 | ||
84 | static void *vb2_dma_contig_vaddr(void *buf_priv) | 84 | static void *vb2_dma_contig_vaddr(void *buf_priv) |
diff --git a/include/media/videobuf2-dma-contig.h b/include/media/videobuf2-dma-contig.h index 1d6188d00efd..7e6c68b23773 100644 --- a/include/media/videobuf2-dma-contig.h +++ b/include/media/videobuf2-dma-contig.h | |||
@@ -14,11 +14,14 @@ | |||
14 | #define _MEDIA_VIDEOBUF2_DMA_COHERENT_H | 14 | #define _MEDIA_VIDEOBUF2_DMA_COHERENT_H |
15 | 15 | ||
16 | #include <media/videobuf2-core.h> | 16 | #include <media/videobuf2-core.h> |
17 | #include <linux/dma-mapping.h> | ||
17 | 18 | ||
18 | static inline unsigned long vb2_dma_contig_plane_paddr( | 19 | static inline dma_addr_t |
19 | struct vb2_buffer *vb, unsigned int plane_no) | 20 | vb2_dma_contig_plane_paddr(struct vb2_buffer *vb, unsigned int plane_no) |
20 | { | 21 | { |
21 | return (unsigned long)vb2_plane_cookie(vb, plane_no); | 22 | dma_addr_t *paddr = vb2_plane_cookie(vb, plane_no); |
23 | |||
24 | return *paddr; | ||
22 | } | 25 | } |
23 | 26 | ||
24 | void *vb2_dma_contig_init_ctx(struct device *dev); | 27 | void *vb2_dma_contig_init_ctx(struct device *dev); |