dmaengine: sa11x0: Mark PM functions as __maybe_unused
authorCai Huoqing <caihuoqing@baidu.com>
Tue, 26 Oct 2021 02:05:07 +0000 (10:05 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 26 Oct 2021 05:25:07 +0000 (10:55 +0530)
Without CONFIG_PM_SLEEP, the runtime suspend/resume functions
are unused, producing a warning:

../drivers/dma/sa11x0-dma.c:1042:12: error: 'sa11x0_dma_resume' defined but not used
../drivers/dma/sa11x0-dma.c:1004:12: error: 'sa11x0_dma_suspend' defined but not used

Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Link: https://lore.kernel.org/r/20211026020508.550-1-caihuoqing@baidu.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/sa11x0-dma.c

index 38f318b2f80d8f18000f4db0dcee17701583e504..a29c13cae7167a8ff694406b312a01f005fd809b 100644 (file)
@@ -1001,7 +1001,7 @@ static int sa11x0_dma_remove(struct platform_device *pdev)
        return 0;
 }
 
-static int sa11x0_dma_suspend(struct device *dev)
+static __maybe_unused int sa11x0_dma_suspend(struct device *dev)
 {
        struct sa11x0_dma_dev *d = dev_get_drvdata(dev);
        unsigned pch;
@@ -1039,7 +1039,7 @@ static int sa11x0_dma_suspend(struct device *dev)
        return 0;
 }
 
-static int sa11x0_dma_resume(struct device *dev)
+static __maybe_unused int sa11x0_dma_resume(struct device *dev)
 {
        struct sa11x0_dma_dev *d = dev_get_drvdata(dev);
        unsigned pch;