Skip to content

Commit 6765e85

Browse files
Fabio Estevambroonie
authored andcommitted
spi: spi-fsl-lpspi: Switch to SYSTEM_SLEEP_PM_OPS()
Replace SET_SYSTEM_SLEEP_PM_OPS with its modern SYSTEM_SLEEP_PM_OPS() alternative. The combined usage of pm_ptr() and SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the runtime suspend/resume() functions are used at build time or are simply dead code. This allows removing the __maybe_unused notation from the runtime suspend/resume() functions. Signed-off-by: Fabio Estevam <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a93f089 commit 6765e85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/spi/spi-fsl-lpspi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -960,13 +960,13 @@ static void fsl_lpspi_remove(struct platform_device *pdev)
960960
pm_runtime_disable(fsl_lpspi->dev);
961961
}
962962

963-
static int __maybe_unused fsl_lpspi_suspend(struct device *dev)
963+
static int fsl_lpspi_suspend(struct device *dev)
964964
{
965965
pinctrl_pm_select_sleep_state(dev);
966966
return pm_runtime_force_suspend(dev);
967967
}
968968

969-
static int __maybe_unused fsl_lpspi_resume(struct device *dev)
969+
static int fsl_lpspi_resume(struct device *dev)
970970
{
971971
int ret;
972972

@@ -984,7 +984,7 @@ static int __maybe_unused fsl_lpspi_resume(struct device *dev)
984984
static const struct dev_pm_ops fsl_lpspi_pm_ops = {
985985
SET_RUNTIME_PM_OPS(fsl_lpspi_runtime_suspend,
986986
fsl_lpspi_runtime_resume, NULL)
987-
SET_SYSTEM_SLEEP_PM_OPS(fsl_lpspi_suspend, fsl_lpspi_resume)
987+
SYSTEM_SLEEP_PM_OPS(fsl_lpspi_suspend, fsl_lpspi_resume)
988988
};
989989

990990
static struct platform_driver fsl_lpspi_driver = {

0 commit comments

Comments
 (0)