summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruva Gole <d-gole@ti.com>2023-04-24 12:25:46 +0200
committerMark Brown <broonie@kernel.org>2023-04-25 17:55:45 +0200
commitcc5f6fa4f6590e3b9eb8d34302ea43af4a3cfed7 (patch)
treef3549b08405e957447378bd95931bba174d5124c
parentTegra TPM driver with HW flow control (diff)
downloadlinux-cc5f6fa4f6590e3b9eb8d34302ea43af4a3cfed7.tar.xz
linux-cc5f6fa4f6590e3b9eb8d34302ea43af4a3cfed7.zip
spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS
Using this macro makes the code more readable. It also inits the members of dev_pm_ops in the following manner without us explicitly needing to: .suspend = bcm63xx_spi_suspend, \ .resume = bcm63xx_spi_resume, \ .freeze = bcm63xx_spi_suspend, \ .thaw = bcm63xx_spi_resume, \ .poweroff = bcm63xx_spi_suspend, \ .restore = bcm63xx_spi_resume Signed-off-by: Dhruva Gole <d-gole@ti.com> Link: https://lore.kernel.org/r/20230424102546.1604484-1-d-gole@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-bcm63xx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index 99395932074c..9aecb77c3d89 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -644,9 +644,7 @@ static int bcm63xx_spi_resume(struct device *dev)
return 0;
}
-static const struct dev_pm_ops bcm63xx_spi_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(bcm63xx_spi_suspend, bcm63xx_spi_resume)
-};
+static DEFINE_SIMPLE_DEV_PM_OPS(bcm63xx_spi_pm_ops, bcm63xx_spi_suspend, bcm63xx_spi_resume);
static struct platform_driver bcm63xx_spi_driver = {
.driver = {