From 0441284be151a3780f37f718b45285cb868342bd Mon Sep 17 00:00:00 2001 From: Joonsoo Kim Date: Thu, 26 Jun 2014 10:42:33 +1000 Subject: [PATCH] CMA: fix ARM build failure related to MAX_CMA_AREAS definition If CMA is disabled, CONFIG_CMA_AREAS isn't defined so compile error happens. To fix it, define MAX_CMA_AREAS if CONFIG_CMA_AREAS isn't defined. Signed-off-by: Joonsoo Kim Reported-by: Stephen Rothwell Signed-off-by: Andrew Morton --- include/linux/cma.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/cma.h b/include/linux/cma.h index 69d3726b40a5..f6f7809acb98 100644 --- a/include/linux/cma.h +++ b/include/linux/cma.h @@ -5,8 +5,14 @@ * There is always at least global CMA area and a few optional * areas configured in kernel .config. */ +#ifdef CONFIG_CMA_AREAS #define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS) +#else +#define MAX_CMA_AREAS (0) + +#endif + struct cma; extern phys_addr_t cma_get_base(struct cma *cma); -- 2.39.5