diff options
Diffstat (limited to 'drivers/media/v4l2-core/videobuf2-vmalloc.c')
-rw-r--r-- | drivers/media/v4l2-core/videobuf2-vmalloc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-vmalloc.c b/drivers/media/v4l2-core/videobuf2-vmalloc.c index bcde88572429..657ab302a5cf 100644 --- a/drivers/media/v4l2-core/videobuf2-vmalloc.c +++ b/drivers/media/v4l2-core/videobuf2-vmalloc.c | |||
@@ -368,11 +368,17 @@ static struct dma_buf *vb2_vmalloc_get_dmabuf(void *buf_priv, unsigned long flag | |||
368 | { | 368 | { |
369 | struct vb2_vmalloc_buf *buf = buf_priv; | 369 | struct vb2_vmalloc_buf *buf = buf_priv; |
370 | struct dma_buf *dbuf; | 370 | struct dma_buf *dbuf; |
371 | DEFINE_DMA_BUF_EXPORT_INFO(exp_info); | ||
372 | |||
373 | exp_info.ops = &vb2_vmalloc_dmabuf_ops; | ||
374 | exp_info.size = buf->size; | ||
375 | exp_info.flags = flags; | ||
376 | exp_info.priv = buf; | ||
371 | 377 | ||
372 | if (WARN_ON(!buf->vaddr)) | 378 | if (WARN_ON(!buf->vaddr)) |
373 | return NULL; | 379 | return NULL; |
374 | 380 | ||
375 | dbuf = dma_buf_export(buf, &vb2_vmalloc_dmabuf_ops, buf->size, flags, NULL); | 381 | dbuf = dma_buf_export(&exp_info); |
376 | if (IS_ERR(dbuf)) | 382 | if (IS_ERR(dbuf)) |
377 | return NULL; | 383 | return NULL; |
378 | 384 | ||