From: Joonsoo Kim Date: Thu, 26 Jun 2014 00:42:33 +0000 (+1000) Subject: CMA: fix ARM build failure related to MAX_CMA_AREAS definition X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0441284be151a3780f37f718b45285cb868342bd;p=karo-tx-linux.git 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 --- 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);