From: Arnd Bergmann Date: Tue, 3 Nov 2015 14:00:57 +0000 (+0100) Subject: dmaengine: edma: fix build without CONFIG_OF X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=638bdc8ce845285e1112f4870aded1638187fc98;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git dmaengine: edma: fix build without CONFIG_OF 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 Fixes: ca304fa9bb76 ("ARM/dmaengine: edma: Public API to use private struct pointer") Acked-by: Peter Ujfalusi Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 6b03e4e84e6b..c69d22c0b9ba 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -1565,7 +1565,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);