dmaengine: bcm2835: Fix a build warning

bcm2835_dma_suspend_late is only used if CONFIG_PM_SLEEP is defined,
so make it's presence similarly conditional to avoid a build warning
(and hence error).

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
Phil Elwell
2025-02-04 17:41:01 +00:00
committed by Dom Cobley
parent dcbf83ffd7
commit fe9868d2ec

View File

@@ -1253,6 +1253,7 @@ static struct dma_chan *bcm2835_dma_xlate(struct of_phandle_args *spec,
return chan;
}
#ifdef CONFIG_PM_SLEEP
static int bcm2835_dma_suspend_late(struct device *dev)
{
struct bcm2835_dmadev *od = dev_get_drvdata(dev);
@@ -1269,6 +1270,9 @@ static int bcm2835_dma_suspend_late(struct device *dev)
return 0;
}
#else
static int bcm2835_dma_suspend_late(struct device *dev) {return 0;}
#endif
static const struct dev_pm_ops bcm2835_dma_pm_ops = {
LATE_SYSTEM_SLEEP_PM_OPS(bcm2835_dma_suspend_late, NULL)