Re: [PATCH] spi: bcm63xx: remove PM_SLEEP based conditional compilation

From: Florian Fainelli
Date: Fri Apr 21 2023 - 13:13:26 EST


On 4/20/23 05:16, Dhruva Gole wrote:
Get rid of conditional compilation based on CONFIG_PM_SLEEP because
it may introduce build issues with certain configs where it maybe disabled
This is because if above config is not enabled the suspend-resume
functions are never part of the code but the bcm63xx_spi_pm_ops struct
still inits them to non-existent suspend-resume functions.

Fixes: b42dfed83d95 ("spi: add Broadcom BCM63xx SPI controller driver")

Signed-off-by: Dhruva Gole <d-gole@xxxxxx>
---
drivers/spi/spi-bcm63xx.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 96633a0051b1..99395932074c 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -617,7 +617,6 @@ static void bcm63xx_spi_remove(struct platform_device *pdev)
clk_disable_unprepare(bs->clk);
}
-#ifdef CONFIG_PM_SLEEP
static int bcm63xx_spi_suspend(struct device *dev)

Don't we need a __maybe_unused here?
--
Florian