aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-07-04 09:14:08 -0400
committerVinod Koul <vinod.koul@intel.com>2016-07-06 13:09:43 -0400
commit184f337e6d859c20e0d3c6954980cbb744e014fb (patch)
tree69fafe1099b5dd8217b01b2c26bfda1fa179fe1b
parent9a8d0efaff4b343e3cff8b2cfaba847a18e2c0d9 (diff)
dmaengine: qcom-bam-dma: add __maybe_unused annotations for PM
The bam_dma driver gained runtime PM support, but that causes build warnings whenever CONFIG_PM is disabled: drivers/dma/qcom/bam_dma.c:1324:12: error: 'bam_dma_runtime_resume' defined but not used [-Werror=unused-function] static int bam_dma_runtime_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~~~~ drivers/dma/qcom/bam_dma.c:1315:12: error: 'bam_dma_runtime_suspend' defined but not used [-Werror=unused-function] static int bam_dma_runtime_suspend(struct device *dev) This removes the incomplete #ifdef guard and instead marks all four PM functions as __maybe_unused, which avoids this kind of warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 7d2545599f5b ("dmaengine: qcom-bam-dma: Add pm_runtime support") Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/qcom/bam_dma.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 4754891742ad..03c4eb3fd314 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -1312,7 +1312,7 @@ static int bam_dma_remove(struct platform_device *pdev)
1312 return 0; 1312 return 0;
1313} 1313}
1314 1314
1315static int bam_dma_runtime_suspend(struct device *dev) 1315static int __maybe_unused bam_dma_runtime_suspend(struct device *dev)
1316{ 1316{
1317 struct bam_device *bdev = dev_get_drvdata(dev); 1317 struct bam_device *bdev = dev_get_drvdata(dev);
1318 1318
@@ -1321,7 +1321,7 @@ static int bam_dma_runtime_suspend(struct device *dev)
1321 return 0; 1321 return 0;
1322} 1322}
1323 1323
1324static int bam_dma_runtime_resume(struct device *dev) 1324static int __maybe_unused bam_dma_runtime_resume(struct device *dev)
1325{ 1325{
1326 struct bam_device *bdev = dev_get_drvdata(dev); 1326 struct bam_device *bdev = dev_get_drvdata(dev);
1327 int ret; 1327 int ret;
@@ -1334,8 +1334,8 @@ static int bam_dma_runtime_resume(struct device *dev)
1334 1334
1335 return 0; 1335 return 0;
1336} 1336}
1337#ifdef CONFIG_PM_SLEEP 1337
1338static int bam_dma_suspend(struct device *dev) 1338static int __maybe_unused bam_dma_suspend(struct device *dev)
1339{ 1339{
1340 struct bam_device *bdev = dev_get_drvdata(dev); 1340 struct bam_device *bdev = dev_get_drvdata(dev);
1341 1341
@@ -1346,7 +1346,7 @@ static int bam_dma_suspend(struct device *dev)
1346 return 0; 1346 return 0;
1347} 1347}
1348 1348
1349static int bam_dma_resume(struct device *dev) 1349static int __maybe_unused bam_dma_resume(struct device *dev)
1350{ 1350{
1351 struct bam_device *bdev = dev_get_drvdata(dev); 1351 struct bam_device *bdev = dev_get_drvdata(dev);
1352 int ret; 1352 int ret;
@@ -1359,7 +1359,6 @@ static int bam_dma_resume(struct device *dev)
1359 1359
1360 return 0; 1360 return 0;
1361} 1361}
1362#endif
1363 1362
1364static const struct dev_pm_ops bam_dma_pm_ops = { 1363static const struct dev_pm_ops bam_dma_pm_ops = {
1365 SET_LATE_SYSTEM_SLEEP_PM_OPS(bam_dma_suspend, bam_dma_resume) 1364 SET_LATE_SYSTEM_SLEEP_PM_OPS(bam_dma_suspend, bam_dma_resume)