summaryrefslogtreecommitdiffstats
path: root/drivers/media/v4l2-core/videobuf2-dma-sg.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-11-18 09:50:59 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-25 08:51:44 -0200
commitd935c57e8fb6902a9ede603bb55d9e158f75f09a (patch)
treef2640e64127e2a8cc1fedc55830fc37aab3ae540 /drivers/media/v4l2-core/videobuf2-dma-sg.c
parentcd474037c4a9a9c15cab46ff26ceeed1bbda6abb (diff)
downloadtalos-op-linux-d935c57e8fb6902a9ede603bb55d9e158f75f09a.tar.gz
talos-op-linux-d935c57e8fb6902a9ede603bb55d9e158f75f09a.zip
[media] vb2: add dma_dir to the alloc memop
This is needed for the next patch where the dma-sg alloc memop needs to know the dma_dir. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Pawel Osciak <pawel@osciak.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/v4l2-core/videobuf2-dma-sg.c')
-rw-r--r--drivers/media/v4l2-core/videobuf2-dma-sg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c
index 6b54a14ee827..2529b831725b 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-sg.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-sg.c
@@ -86,7 +86,8 @@ static int vb2_dma_sg_alloc_compacted(struct vb2_dma_sg_buf *buf,
return 0;
}
-static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size, gfp_t gfp_flags)
+static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size,
+ enum dma_data_direction dma_dir, gfp_t gfp_flags)
{
struct vb2_dma_sg_buf *buf;
int ret;
@@ -97,7 +98,7 @@ static void *vb2_dma_sg_alloc(void *alloc_ctx, unsigned long size, gfp_t gfp_fla
return NULL;
buf->vaddr = NULL;
- buf->dma_dir = DMA_NONE;
+ buf->dma_dir = dma_dir;
buf->offset = 0;
buf->size = size;
/* size is already page aligned */
OpenPOWER on IntegriCloud