dma-buf: Use struct dma_buf_map in dma_buf_vunmap() interfaces
[linux-2.6-microblaze.git] / drivers / media / common / videobuf2 / videobuf2-dma-contig.c
index 1142828..a1eb827 100644 (file)
@@ -648,6 +648,7 @@ static void vb2_dc_unmap_dmabuf(void *mem_priv)
 {
        struct vb2_dc_buf *buf = mem_priv;
        struct sg_table *sgt = buf->dma_sgt;
+       struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(buf->vaddr);
 
        if (WARN_ON(!buf->db_attach)) {
                pr_err("trying to unpin a not attached buffer\n");
@@ -660,7 +661,7 @@ static void vb2_dc_unmap_dmabuf(void *mem_priv)
        }
 
        if (buf->vaddr) {
-               dma_buf_vunmap(buf->db_attach->dmabuf, buf->vaddr);
+               dma_buf_vunmap(buf->db_attach->dmabuf, &map);
                buf->vaddr = NULL;
        }
        dma_buf_unmap_attachment(buf->db_attach, sgt, buf->dma_dir);