summaryrefslogtreecommitdiff
path: root/drivers/media/v4l2-core/videobuf2-vmalloc.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-01 15:44:20 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-21 13:17:51 -0300
commitb6ba2057f7823352bbc44ee846faa03b36e8b6ac (patch)
tree130c5bafcd2e497c45d8a1e5e9e764dc88bff00c /drivers/media/v4l2-core/videobuf2-vmalloc.c
parent808d24d6c0b5c30c8f804b251caf476ea63954ef (diff)
[media] videobuf2: add gfp_flags
Some drivers have special memory requirements for their buffers, usually related to DMA (e.g. GFP_DMA or __GFP_DMA32). Make it possible to specify additional GFP flags for those buffers by adding a gfp_flags field to vb2_queue. Note that this field will be replaced in the future with a different mechanism, but that is still work in progress and we need this feature now so we won't be able to convert drivers with such requirements to vb2. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/v4l2-core/videobuf2-vmalloc.c')
-rw-r--r--drivers/media/v4l2-core/videobuf2-vmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-vmalloc.c b/drivers/media/v4l2-core/videobuf2-vmalloc.c
index a47fd4f589a1..313d9771b2bc 100644
--- a/drivers/media/v4l2-core/videobuf2-vmalloc.c
+++ b/drivers/media/v4l2-core/videobuf2-vmalloc.c
@@ -35,11 +35,11 @@ struct vb2_vmalloc_buf {
static void vb2_vmalloc_put(void *buf_priv);
-static void *vb2_vmalloc_alloc(void *alloc_ctx, unsigned long size)
+static void *vb2_vmalloc_alloc(void *alloc_ctx, unsigned long size, gfp_t gfp_flags)
{
struct vb2_vmalloc_buf *buf;
- buf = kzalloc(sizeof(*buf), GFP_KERNEL);
+ buf = kzalloc(sizeof(*buf), GFP_KERNEL | gfp_flags);
if (!buf)
return NULL;