From 0dfdf7a8537ed5bafbb45659f258efcd7eac0fe2 Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Fri, 25 Mar 2022 15:16:38 +0800 Subject: [PATCH] media: common: videobuf2: fix cma sg alloc depends on CONFIG_CMA Signed-off-by: Jianqun Xu Change-Id: I1370bc264f2a673a14562f088cb2abdb13a01b30 --- drivers/media/common/videobuf2/videobuf2-cma-sg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-cma-sg.c b/drivers/media/common/videobuf2/videobuf2-cma-sg.c index d23989345787..a09474c4da15 100644 --- a/drivers/media/common/videobuf2/videobuf2-cma-sg.c +++ b/drivers/media/common/videobuf2/videobuf2-cma-sg.c @@ -102,7 +102,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf) int i; bool cma_en = false; - if (IS_ENABLED(CONFIG_DMA_CMA)) { + if (IS_ENABLED(CONFIG_CMA)) { struct rk_dma_heap *heap = rk_dma_heap_find("rk-dma-heap-cma"); cma_en = true; @@ -114,7 +114,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf) get_order(buf->size), GFP_KERNEL); } if (!page) { - pr_err("CONFIG_DMA_CMA en:%d alloc pages fail\n", cma_en); + pr_err("%s: cma_en:%d alloc pages fail\n", __func__, cma_en); return -ENOMEM; } for (i = 0; i < buf->num_pages; i++) @@ -125,7 +125,7 @@ static int vb2_cma_sg_alloc_contiguous(struct vb2_cma_sg_buf *buf) static void vb2_cma_sg_free_contiguous(struct vb2_cma_sg_buf *buf) { - if (IS_ENABLED(CONFIG_DMA_CMA)) { + if (IS_ENABLED(CONFIG_CMA)) { struct rk_dma_heap *heap = rk_dma_heap_find("rk-dma-heap-cma"); if (heap)