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 114f71a786
commit e0a861c2bd

View File

@@ -1250,6 +1250,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);
@@ -1266,6 +1267,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)