linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: edma: fix build without CONFIG_OF
@ 2015-11-03 14:00 Arnd Bergmann
  2015-11-04  7:42 ` Peter Ujfalusi
  2015-11-16  3:36 ` Vinod Koul
  0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-11-03 14:00 UTC (permalink / raw)
  To: Vinod Koul, dmaengine
  Cc: Dan Williams, linux-kernel, Peter Ujfalusi, linux-arm-kernel,
	Sekhar Nori, Kevin Hilman, linux-omap

During the edma rework, a build error was introduced for the
case that CONFIG_OF is disabled:

drivers/built-in.o: In function `edma_tc_set_pm_state':
:(.text+0x43bf0): undefined reference to `of_find_device_by_node'

As the edma_tc_set_pm_state() function does nothing in case
we are running without OF, this adds an IS_ENABLED() check
that turns the function into an empty stub then and avoids the
link error.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ca304fa9bb76 ("ARM/dmaengine: edma: Public API to use private struct pointer")
---
Found on ARM randconfig builds with today's linux-next

diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
index 31722d436a42..16713a93da10 100644
--- a/drivers/dma/edma.c
+++ b/drivers/dma/edma.c
@@ -1560,7 +1560,7 @@ static void edma_tc_set_pm_state(struct edma_tc *tc, bool enable)
 	struct platform_device *tc_pdev;
 	int ret;
 
-	if (!tc)
+	if (!IS_ENABLED(CONFIG_OF) || !tc)
 		return;
 
 	tc_pdev = of_find_device_by_node(tc->node);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-16  3:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-03 14:00 [PATCH] dmaengine: edma: fix build without CONFIG_OF Arnd Bergmann
2015-11-04  7:42 ` Peter Ujfalusi
2015-11-04  8:46   ` Arnd Bergmann
2015-11-04  9:05     ` Peter Ujfalusi
2015-11-04 10:29       ` Arnd Bergmann
2015-11-16  3:36 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).