[PATCH] cma_heap: fix implicit function declaration

From: siyanteng01
Date: Thu Dec 17 2020 - 07:33:13 EST


From: siyanteng <siyanteng01@xxxxxxxxx>

When building cma_heap the following error shows up:

drivers/dma-buf/heaps/cma_heap.c:195:10: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration]
195 | vaddr = vmap(buffer->pages, buffer->pagecount, VM_MAP, PAGE_KERNEL);
| ^~~~
| kmap

Use this include: linux-next/include/linux/vmalloc.h

Signed-off-by: siyanteng <siyanteng01@xxxxxxxxx>
---
drivers/dma-buf/heaps/cma_heap.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/dma-buf/heaps/cma_heap.c b/drivers/dma-buf/heaps/cma_heap.c
index 5e7c3436310c..3c4e34301172 100644
--- a/drivers/dma-buf/heaps/cma_heap.c
+++ b/drivers/dma-buf/heaps/cma_heap.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/scatterlist.h>
#include <linux/slab.h>
+#include <linux/vmalloc.h>


struct cma_heap {
--
2.27.0