base: add CONFIG_AMLOGIC_MODIFY for EXPORT_SYMBOL
authorJiacheng Mei <jiacheng.mei@amlogic.com>
Wed, 6 Jun 2018 08:00:41 +0000 (16:00 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Fri, 29 Jun 2018 07:31:09 +0000 (00:31 -0700)
PD#165090: EXPORT_SYMBOL for dma_alloc_from_contiguous && dma_release_from_contiguous

Change-Id: I99720292a02e3f3939bd3ad274daa82d8bc485b2
Signed-off-by: Jiacheng Mei <jiacheng.mei@amlogic.com>
drivers/base/dma-contiguous.c

index e4e36df..0085c21 100644 (file)
@@ -195,8 +195,9 @@ struct page *dma_alloc_from_contiguous(struct device *dev, size_t count,
 
        return cma_alloc(dev_get_cma_area(dev), count, align);
 }
+#ifdef CONFIG_AMLOGIC_MODIFY
 EXPORT_SYMBOL(dma_alloc_from_contiguous);
-
+#endif
 /**
  * dma_release_from_contiguous() - release allocated pages
  * @dev:   Pointer to device for which the pages were allocated.
@@ -212,7 +213,9 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
 {
        return cma_release(dev_get_cma_area(dev), pages, count);
 }
+#ifdef CONFIG_AMLOGIC_MODIFY
 EXPORT_SYMBOL(dma_release_from_contiguous);
+#endif
 /*
  * Support for reserved memory regions defined in device tree
  */