File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -1320,7 +1320,6 @@ static const struct platform_device_id spi_driver_ids[] = {
1320
1320
};
1321
1321
MODULE_DEVICE_TABLE (platform , spi_driver_ids );
1322
1322
1323
- #ifdef CONFIG_PM_SLEEP
1324
1323
static int sh_msiof_spi_suspend (struct device * dev )
1325
1324
{
1326
1325
struct sh_msiof_spi_priv * p = dev_get_drvdata (dev );
@@ -1335,20 +1334,16 @@ static int sh_msiof_spi_resume(struct device *dev)
1335
1334
return spi_controller_resume (p -> ctlr );
1336
1335
}
1337
1336
1338
- static SIMPLE_DEV_PM_OPS (sh_msiof_spi_pm_ops , sh_msiof_spi_suspend ,
1339
- sh_msiof_spi_resume ) ;
1340
- #define DEV_PM_OPS (&sh_msiof_spi_pm_ops)
1341
- #else
1342
- #define DEV_PM_OPS NULL
1343
- #endif /* CONFIG_PM_SLEEP */
1337
+ static DEFINE_SIMPLE_DEV_PM_OPS (sh_msiof_spi_pm_ops , sh_msiof_spi_suspend ,
1338
+ sh_msiof_spi_resume ) ;
1344
1339
1345
1340
static struct platform_driver sh_msiof_spi_drv = {
1346
1341
.probe = sh_msiof_spi_probe ,
1347
1342
.remove = sh_msiof_spi_remove ,
1348
1343
.id_table = spi_driver_ids ,
1349
1344
.driver = {
1350
1345
.name = "spi_sh_msiof" ,
1351
- .pm = DEV_PM_OPS ,
1346
+ .pm = pm_sleep_ptr ( & sh_msiof_spi_pm_ops ) ,
1352
1347
.of_match_table = of_match_ptr (sh_msiof_match ),
1353
1348
},
1354
1349
};
You can’t perform that action at this time.
0 commit comments