Message ID | 1474361960-12434-27-git-send-email-vinod.koul@intel.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
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,
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@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> --- drivers/dma/tegra210-adma.c | 2 ++ 1 file changed, 2 insertions(+)