spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS
Subsystems (2)
PATCH 1/1 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
--- drivers/spi/spi-bcm63xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/spi/spi-bcm63xx.c +1 -3
@@ -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 = {
Signature · 1 line
2.25.1
Jonas Gorski
maintainerQuoted 5 lines · Dhruva Gole
Using this macro makes the code more readable.
It also inits the members ofdev_pm_opsin the following manner without us explicitly needing to:
Quoted 8 lines
.suspend =
bcm63xx_spi_suspend, \
.resume =bcm63xx_spi_resume, \
.freeze =bcm63xx_spi_suspend, \
.thaw =bcm63xx_spi_resume, \
.poweroff =bcm63xx_spi_suspend, \
.restore =bcm63xx_spi_resumeSigned-off-by Dhruva Gole <[email protected]>
I think this should have an appropriate Fixes tag as it will fix a build warning when building with !CONFIG_PM after applying the previous patch.
Regards
Jonas
Hi Jonas,
Quoted 12 lines · Jonas Gorski
Quoted 11 lines · Dhruva Gole
Using this macro makes the code more readable.
It also inits the members ofdev_pm_opsin 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
Quoted 4 lines
Quoted 1 line
Signed-off-by Dhruva Gole <[email protected]>I think this should have an appropriate Fixes tag as it will fix a build warning when building with !CONFIG_PM after applying the previous patch.
You mean these build issues that have been pointed here?
https://lore.kernel.org/all/[email protected]/
So I should add a fixes "spi: bcm63xx: remove PM_SLEEP based conditional compilation"
corresponding fixes tag?
Quoted 3 lines
Regards
Jonas
Signature · 2 lines
Regards, Dhruva Gole <[email protected]>
Mark Brown
maintainerQuoted 4 lines · Dhruva Gole
Using this macro makes the code more readable.
It also inits the members ofdev_pm_opsin the following manner without us explicitly needing to:
Quoted 8 lines
.suspend =
bcm63xx_spi_suspend, \
.resume =bcm63xx_spi_resume, \
.freeze =bcm63xx_spi_suspend, \
.thaw =bcm63xx_spi_resume, \
.poweroff =bcm63xx_spi_suspend, \
.restore =bcm63xx_spi_resume[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: bcm63xx: use macro DEFINE_SIMPLE_DEV_PM_OPS
commit: cc5f6fa4f6590e3b9eb8d34302ea43af4a3cfed7
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark