Skip to content

Commit a48d44c

Browse files
YueHaibingvinodkoul
authored andcommitted
dmaengine: tegra-apb: mark PM functions as __maybe_unused
When CONFIG_PM is disabled, gcc warning this: drivers/dma/tegra20-apb-dma.c:1587:12: warning: 'tegra_dma_runtime_resume' defined but not used [-Wunused-function] drivers/dma/tegra20-apb-dma.c:1578:12: warning: 'tegra_dma_runtime_suspend' defined but not used [-Wunused-function] Make it as __maybe_unused to fix the warnings, also remove unneeded function declarations. Fixes: ec8a158 ("dma: tegra: add dmaengine based dma driver") Signed-off-by: YueHaibing <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Acked-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 1986f03 commit a48d44c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/dma/tegra20-apb-dma.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,6 @@ static inline struct device *tdc2dev(struct tegra_dma_channel *tdc)
263263
}
264264

265265
static dma_cookie_t tegra_dma_tx_submit(struct dma_async_tx_descriptor *tx);
266-
static int tegra_dma_runtime_suspend(struct device *dev);
267-
static int tegra_dma_runtime_resume(struct device *dev);
268266

269267
/* Get DMA desc from free list, if not there then allocate it. */
270268
static struct tegra_dma_desc *tegra_dma_desc_get(struct tegra_dma_channel *tdc)
@@ -1580,7 +1578,7 @@ static int tegra_dma_remove(struct platform_device *pdev)
15801578
return 0;
15811579
}
15821580

1583-
static int tegra_dma_runtime_suspend(struct device *dev)
1581+
static int __maybe_unused tegra_dma_runtime_suspend(struct device *dev)
15841582
{
15851583
struct tegra_dma *tdma = dev_get_drvdata(dev);
15861584

@@ -1589,7 +1587,7 @@ static int tegra_dma_runtime_suspend(struct device *dev)
15891587
return 0;
15901588
}
15911589

1592-
static int tegra_dma_runtime_resume(struct device *dev)
1590+
static int __maybe_unused tegra_dma_runtime_resume(struct device *dev)
15931591
{
15941592
struct tegra_dma *tdma = dev_get_drvdata(dev);
15951593

0 commit comments

Comments
 (0)