diff mbox

dma: of: Move the functions under CONFIG_OF_DMA instead of CONFIG_OF

Message ID 1393546850-13907-1-git-send-email-santosh.shilimkar@ti.com
State New
Headers show

Commit Message

Santosh Shilimkar Feb. 28, 2014, 12:20 a.m. UTC
The of-dma.c is compiled out with !CONFIG_OF_DMA but the functions in
the header are kept under CONFIG_OF. Move them under CONFIG_OF_DMA
to avoid build errors with CONFIG_OFF && !CONFIG_OF_DMA

Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 include/linux/of_dma.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Santosh Shilimkar Feb. 28, 2014, 3:03 p.m. UTC | #1
On Friday 28 February 2014 09:47 AM, Arnd Bergmann wrote:
> On Friday 28 February 2014 09:24:27 Santosh Shilimkar wrote:
>> So for ARM 'allnoconfig' build we have CONFIG_OF enabled but
>> CONFIG_DMA_OF disabled. With that the of-dma.c gets compiled
>> out leaving the functions from of-dma.h undefined. I noticed
>> this while adding couple of exports in of_dma.h
> 
> Looking at current linux-next, I find
> 
> Kconfig:
> 
> menuconfig DMADEVICES
>         bool "DMA Engine support"
> ...
> if DMADEVICES
> 
> config DMA_OF
>         def_bool y
>         depends on OF
> 
> endif
> 
> This means that DMA_OF is disabled in 'allnoconfig' since DMADEVICES
> is also disabled, as you say. The Makefile looks like
> 
> obj-$(CONFIG_DMA_OF) += of-dma.o
> 
> As of 5fa422c922c25 "dmaengine: move drivers/of/dma.c -> drivers/dma/of-dma.c"
> 
> which seems to solve the problem already.
> 
>> I am not sure but we added couple of functions for dma-ranges
>> and dma-coherent which gets called from generic code.
> 
> These functions have nothing to do with the dmaengine code though,
> they should be in a different file.
> 
Any suggestion on different file ?
diff mbox

Patch

diff --git a/include/linux/of_dma.h b/include/linux/of_dma.h
index 0322363..3d2beab 100644
--- a/include/linux/of_dma.h
+++ b/include/linux/of_dma.h
@@ -31,7 +31,7 @@  struct of_dma_filter_info {
 	dma_filter_fn	filter_fn;
 };
 
-#ifdef CONFIG_OF
+#ifdef CONFIG_OF_DMA
 extern int of_dma_controller_register(struct device_node *np,
 		struct dma_chan *(*of_dma_xlate)
 		(struct of_phandle_args *, struct of_dma *),