mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
spi: omap2-mcspi: use modern PM macros
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 <jszhang@kernel.org> Link: https://patch.msgid.link/20260803142003.12857-23-jszhang@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
169d9f0fd9
commit
aa9d02583a
|
|
@ -1620,7 +1620,7 @@ static void omap2_mcspi_remove(struct platform_device *pdev)
|
|||
/* work with hotplug and coldplug */
|
||||
MODULE_ALIAS("platform:omap2_mcspi");
|
||||
|
||||
static int __maybe_unused omap2_mcspi_suspend(struct device *dev)
|
||||
static int omap2_mcspi_suspend(struct device *dev)
|
||||
{
|
||||
struct spi_controller *ctlr = dev_get_drvdata(dev);
|
||||
struct omap2_mcspi *mcspi = spi_controller_get_devdata(ctlr);
|
||||
|
|
@ -1639,7 +1639,7 @@ static int __maybe_unused omap2_mcspi_suspend(struct device *dev)
|
|||
return pm_runtime_force_suspend(dev);
|
||||
}
|
||||
|
||||
static int __maybe_unused omap2_mcspi_resume(struct device *dev)
|
||||
static int omap2_mcspi_resume(struct device *dev)
|
||||
{
|
||||
struct spi_controller *ctlr = dev_get_drvdata(dev);
|
||||
struct omap2_mcspi *mcspi = spi_controller_get_devdata(ctlr);
|
||||
|
|
@ -1654,8 +1654,7 @@ static int __maybe_unused omap2_mcspi_resume(struct device *dev)
|
|||
}
|
||||
|
||||
static const struct dev_pm_ops omap2_mcspi_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(omap2_mcspi_suspend,
|
||||
omap2_mcspi_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(omap2_mcspi_suspend, omap2_mcspi_resume)
|
||||
.runtime_suspend = omap_mcspi_runtime_suspend,
|
||||
.runtime_resume = omap_mcspi_runtime_resume,
|
||||
};
|
||||
|
|
@ -1663,7 +1662,7 @@ static const struct dev_pm_ops omap2_mcspi_pm_ops = {
|
|||
static struct platform_driver omap2_mcspi_driver = {
|
||||
.driver = {
|
||||
.name = "omap2_mcspi",
|
||||
.pm = &omap2_mcspi_pm_ops,
|
||||
.pm = pm_ptr(&omap2_mcspi_pm_ops),
|
||||
.of_match_table = omap_mcspi_of_match,
|
||||
},
|
||||
.probe = omap2_mcspi_probe,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user