[PATCH] CMA: fix ARM build failure related to MAX_CMA_AREAS definition
From: Joonsoo Kim
Date: Fri Jun 20 2014 - 00:30:56 EST
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@xxxxxxx>
diff --git a/include/linux/cma.h b/include/linux/cma.h
index 32cab7a..371b930 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);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/