Skip to content

Commit cc5f6fa

Browse files
DhruvaG2000broonie
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent d9f3a60 commit cc5f6fa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/spi/spi-bcm63xx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,7 @@ static int bcm63xx_spi_resume(struct device *dev)
644644
return 0;
645645
}
646646

647-
static const struct dev_pm_ops bcm63xx_spi_pm_ops = {
648-
SET_SYSTEM_SLEEP_PM_OPS(bcm63xx_spi_suspend, bcm63xx_spi_resume)
649-
};
647+
static DEFINE_SIMPLE_DEV_PM_OPS(bcm63xx_spi_pm_ops, bcm63xx_spi_suspend, bcm63xx_spi_resume);
650648

651649
static struct platform_driver bcm63xx_spi_driver = {
652650
.driver = {

0 commit comments

Comments
 (0)