File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -1404,7 +1404,6 @@ static const struct platform_device_id spi_driver_ids[] = {
1404
1404
1405
1405
MODULE_DEVICE_TABLE (platform , spi_driver_ids );
1406
1406
1407
- #ifdef CONFIG_PM_SLEEP
1408
1407
static int rspi_suspend (struct device * dev )
1409
1408
{
1410
1409
struct rspi_data * rspi = dev_get_drvdata (dev );
@@ -1419,19 +1418,15 @@ static int rspi_resume(struct device *dev)
1419
1418
return spi_controller_resume (rspi -> ctlr );
1420
1419
}
1421
1420
1422
- static SIMPLE_DEV_PM_OPS (rspi_pm_ops , rspi_suspend , rspi_resume ) ;
1423
- #define DEV_PM_OPS &rspi_pm_ops
1424
- #else
1425
- #define DEV_PM_OPS NULL
1426
- #endif /* CONFIG_PM_SLEEP */
1421
+ static DEFINE_SIMPLE_DEV_PM_OPS (rspi_pm_ops , rspi_suspend , rspi_resume ) ;
1427
1422
1428
1423
static struct platform_driver rspi_driver = {
1429
1424
.probe = rspi_probe ,
1430
1425
.remove = rspi_remove ,
1431
1426
.id_table = spi_driver_ids ,
1432
1427
.driver = {
1433
1428
.name = "renesas_spi" ,
1434
- .pm = DEV_PM_OPS ,
1429
+ .pm = pm_sleep_ptr ( & rspi_pm_ops ) ,
1435
1430
.of_match_table = of_match_ptr (rspi_of_match ),
1436
1431
},
1437
1432
};
You can’t perform that action at this time.
0 commit comments