On Tue, Sep 20, 2016 at 12:26:59PM +0100, Jon Hunter wrote: > > On 20/09/16 09:59, Vinod Koul wrote: > > when CONFIG_PM is not defined, the compiler warns > > > > CC drivers/dma/tegra210-adma.o > > drivers/dma/tegra210-adma.c:635:12: warning: 'tegra_adma_runtime_suspend' defined but not used [-Wunused-function] > > static int tegra_adma_runtime_suspend(struct device *dev) > > ^ > > drivers/dma/tegra210-adma.c:644:12: warning: 'tegra_adma_runtime_resume' defined but not used [-Wunused-function] > > static int tegra_adma_runtime_resume(struct device *dev) > > ^ > > > > Although driver uses SET_RUNTIME_PM_OPS but doesn't add protection for these > > symbols causing warning when CONFIG_PM is not defined, so add CONFIG_PM > > around these symbols. > > > > Cc: Jon Hunter <jonathanh@xxxxxxxxxx> > > Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx> > > --- > > drivers/dma/tegra210-adma.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c > > index c4b121c4559d..e8ee6f95ddb2 100644 > > --- a/drivers/dma/tegra210-adma.c > > +++ b/drivers/dma/tegra210-adma.c > > @@ -632,6 +632,7 @@ static struct dma_chan *tegra_dma_of_xlate(struct of_phandle_args *dma_spec, > > return chan; > > } > > > > +#ifdef CONFIG_PM > > static int tegra_adma_runtime_suspend(struct device *dev) > > { > > struct tegra_adma *tdma = dev_get_drvdata(dev); > > @@ -654,6 +655,7 @@ static int tegra_adma_runtime_resume(struct device *dev) > > > > return 0; > > } > > +#endif > > > > static const struct tegra_adma_chip_data tegra210_chip_data = { > > .nr_channels = 22, > > Even after making this change I get ... > > drivers/built-in.o: In function `pm_clk_create': > /home/jonathanh/workdir/tegra/korg-linux.git/drivers/base/power/clock_ops.c:312: undefined reference to `dev_pm_get_subsys_data' > drivers/built-in.o: In function `pm_clk_destroy': > /home/jonathanh/workdir/tegra/korg-linux.git/drivers/base/power/clock_ops.c:341: undefined reference to `dev_pm_put_subsys_data' > drivers/built-in.o: In function `pm_clk_create': > /home/jonathanh/workdir/tegra/korg-linux.git/drivers/base/power/clock_ops.c:312: undefined reference to `dev_pm_get_subsys_data' > make: *** [vmlinux] Error 1 Hmmm, can you share the config used? I didnt flag in my tests > > I think it would be best to solve this by ... > > diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig > index 8c98779a12b1..ac6442fe9053 100644 > --- a/drivers/dma/Kconfig > +++ b/drivers/dma/Kconfig > @@ -469,10 +469,9 @@ config TEGRA20_APB_DMA > > config TEGRA210_ADMA > bool "NVIDIA Tegra210 ADMA support" > - depends on ARCH_TEGRA_210_SOC > + depends on ARCH_TEGRA_210_SOC && PM_CLK > select DMA_ENGINE > select DMA_VIRTUAL_CHANNELS > - select PM_CLK > help > Support for the NVIDIA Tegra210 ADMA controller driver. The > DMA controller has multiple DMA channels and is used to service > > I can send a patch if you like. > > Cheers > Jon > > -- > nvpublic > -- > To unsubscribe from this list: send the line "unsubscribe dmaengine" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html