[PATCH 01/39] spi: atmel-quadspi: use modern PM macros

Jisheng Zhang <[email protected]> Mon, 3 Aug 2026 22:19:25 +0800
Newsgroups org.kernel.vger.linux-spi,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Use the modern PM macros for the suspend and resume functions to be
automatically dropped by the compiler when CONFIG_PM or
CONFIG_PM_SLEEP are disabled, without having to use __maybe_unused.

Signed-off-by: Jisheng Zhang <[email protected]>
---
 drivers/spi/atmel-quadspi.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index aaf7f4c46b22..28b6cfcaf34c 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -1527,7 +1527,7 @@ static void atmel_qspi_remove(struct platform_device *pdev)
 	}
 }
 
-static int __maybe_unused atmel_qspi_suspend(struct device *dev)
+static int atmel_qspi_suspend(struct device *dev)
 {
 	struct spi_controller *ctrl = dev_get_drvdata(dev);
 	struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
@@ -1554,7 +1554,7 @@ static int __maybe_unused atmel_qspi_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused atmel_qspi_resume(struct device *dev)
+static int atmel_qspi_resume(struct device *dev)
 {
 	struct spi_controller *ctrl = dev_get_drvdata(dev);
 	struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
@@ -1586,7 +1586,7 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused atmel_qspi_runtime_suspend(struct device *dev)
+static int atmel_qspi_runtime_suspend(struct device *dev)
 {
 	struct spi_controller *ctrl = dev_get_drvdata(dev);
 	struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
@@ -1597,7 +1597,7 @@ static int __maybe_unused atmel_qspi_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int __maybe_unused atmel_qspi_runtime_resume(struct device *dev)
+static int atmel_qspi_runtime_resume(struct device *dev)
 {
 	struct spi_controller *ctrl = dev_get_drvdata(dev);
 	struct atmel_qspi *aq = spi_controller_get_devdata(ctrl);
@@ -1614,10 +1614,10 @@ static int __maybe_unused atmel_qspi_runtime_resume(struct device *dev)
 	return ret;
 }
 
-static const struct dev_pm_ops __maybe_unused atmel_qspi_pm_ops = {
-	SET_SYSTEM_SLEEP_PM_OPS(atmel_qspi_suspend, atmel_qspi_resume)
-	SET_RUNTIME_PM_OPS(atmel_qspi_runtime_suspend,
-			   atmel_qspi_runtime_resume, NULL)
+static const struct dev_pm_ops atmel_qspi_pm_ops = {
+	SYSTEM_SLEEP_PM_OPS(atmel_qspi_suspend, atmel_qspi_resume)
+	RUNTIME_PM_OPS(atmel_qspi_runtime_suspend,
+		       atmel_qspi_runtime_resume, NULL)
 };
 
 static const struct atmel_qspi_caps atmel_sama5d2_qspi_caps = {};
-- 
2.53.0