]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
CMA: fix ARM build failure related to MAX_CMA_AREAS definition
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>
Thu, 26 Jun 2014 00:42:33 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 26 Jun 2014 00:42:33 +0000 (10:42 +1000)
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 <iamjoonsoo.kim@lge.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/cma.h

index 69d3726b40a546113216317c503ab1ee22d2e13f..f6f7809acb98cfb5e3823d3064b5df7508bc4408 100644 (file)
@@ -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);