File tree Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Expand file tree Collapse file tree 4 files changed +8
-16
lines changed Original file line number Diff line number Diff line change @@ -1352,7 +1352,6 @@ static int stm32_i2s_probe(struct platform_device *pdev)
1352
1352
1353
1353
MODULE_DEVICE_TABLE (of , stm32_i2s_ids );
1354
1354
1355
- #ifdef CONFIG_PM_SLEEP
1356
1355
static int stm32_i2s_suspend (struct device * dev )
1357
1356
{
1358
1357
struct stm32_i2s_data * i2s = dev_get_drvdata (dev );
@@ -1370,17 +1369,16 @@ static int stm32_i2s_resume(struct device *dev)
1370
1369
regcache_cache_only (i2s -> regmap , false);
1371
1370
return regcache_sync (i2s -> regmap );
1372
1371
}
1373
- #endif /* CONFIG_PM_SLEEP */
1374
1372
1375
1373
static const struct dev_pm_ops stm32_i2s_pm_ops = {
1376
- SET_SYSTEM_SLEEP_PM_OPS (stm32_i2s_suspend , stm32_i2s_resume )
1374
+ SYSTEM_SLEEP_PM_OPS (stm32_i2s_suspend , stm32_i2s_resume )
1377
1375
};
1378
1376
1379
1377
static struct platform_driver stm32_i2s_driver = {
1380
1378
.driver = {
1381
1379
.name = "st,stm32-i2s" ,
1382
1380
.of_match_table = stm32_i2s_ids ,
1383
- .pm = & stm32_i2s_pm_ops ,
1381
+ .pm = pm_ptr ( & stm32_i2s_pm_ops ) ,
1384
1382
},
1385
1383
.probe = stm32_i2s_probe ,
1386
1384
.remove = stm32_i2s_remove ,
Original file line number Diff line number Diff line change @@ -270,7 +270,6 @@ static int stm32_sai_probe(struct platform_device *pdev)
270
270
return devm_of_platform_populate (& pdev -> dev );
271
271
}
272
272
273
- #ifdef CONFIG_PM_SLEEP
274
273
/*
275
274
* When pins are shared by two sai sub instances, pins have to be defined
276
275
* in sai parent node. In this case, pins state is not managed by alsa fw.
@@ -305,10 +304,9 @@ static int stm32_sai_resume(struct device *dev)
305
304
306
305
return pinctrl_pm_select_default_state (dev );
307
306
}
308
- #endif /* CONFIG_PM_SLEEP */
309
307
310
308
static const struct dev_pm_ops stm32_sai_pm_ops = {
311
- SET_SYSTEM_SLEEP_PM_OPS (stm32_sai_suspend , stm32_sai_resume )
309
+ SYSTEM_SLEEP_PM_OPS (stm32_sai_suspend , stm32_sai_resume )
312
310
};
313
311
314
312
MODULE_DEVICE_TABLE (of , stm32_sai_ids );
@@ -317,7 +315,7 @@ static struct platform_driver stm32_sai_driver = {
317
315
.driver = {
318
316
.name = "st,stm32-sai" ,
319
317
.of_match_table = stm32_sai_ids ,
320
- .pm = & stm32_sai_pm_ops ,
318
+ .pm = pm_ptr ( & stm32_sai_pm_ops ) ,
321
319
},
322
320
.probe = stm32_sai_probe ,
323
321
};
Original file line number Diff line number Diff line change @@ -1704,7 +1704,6 @@ static void stm32_sai_sub_remove(struct platform_device *pdev)
1704
1704
pm_runtime_disable (& pdev -> dev );
1705
1705
}
1706
1706
1707
- #ifdef CONFIG_PM_SLEEP
1708
1707
static int stm32_sai_sub_suspend (struct device * dev )
1709
1708
{
1710
1709
struct stm32_sai_sub_data * sai = dev_get_drvdata (dev );
@@ -1738,17 +1737,16 @@ static int stm32_sai_sub_resume(struct device *dev)
1738
1737
1739
1738
return ret ;
1740
1739
}
1741
- #endif /* CONFIG_PM_SLEEP */
1742
1740
1743
1741
static const struct dev_pm_ops stm32_sai_sub_pm_ops = {
1744
- SET_SYSTEM_SLEEP_PM_OPS (stm32_sai_sub_suspend , stm32_sai_sub_resume )
1742
+ SYSTEM_SLEEP_PM_OPS (stm32_sai_sub_suspend , stm32_sai_sub_resume )
1745
1743
};
1746
1744
1747
1745
static struct platform_driver stm32_sai_sub_driver = {
1748
1746
.driver = {
1749
1747
.name = "st,stm32-sai-sub" ,
1750
1748
.of_match_table = stm32_sai_sub_ids ,
1751
- .pm = & stm32_sai_sub_pm_ops ,
1749
+ .pm = pm_ptr ( & stm32_sai_sub_pm_ops ) ,
1752
1750
},
1753
1751
.probe = stm32_sai_sub_probe ,
1754
1752
.remove = stm32_sai_sub_remove ,
Original file line number Diff line number Diff line change @@ -1040,7 +1040,6 @@ static int stm32_spdifrx_probe(struct platform_device *pdev)
1040
1040
1041
1041
MODULE_DEVICE_TABLE (of , stm32_spdifrx_ids );
1042
1042
1043
- #ifdef CONFIG_PM_SLEEP
1044
1043
static int stm32_spdifrx_suspend (struct device * dev )
1045
1044
{
1046
1045
struct stm32_spdifrx_data * spdifrx = dev_get_drvdata (dev );
@@ -1059,17 +1058,16 @@ static int stm32_spdifrx_resume(struct device *dev)
1059
1058
1060
1059
return regcache_sync (spdifrx -> regmap );
1061
1060
}
1062
- #endif /* CONFIG_PM_SLEEP */
1063
1061
1064
1062
static const struct dev_pm_ops stm32_spdifrx_pm_ops = {
1065
- SET_SYSTEM_SLEEP_PM_OPS (stm32_spdifrx_suspend , stm32_spdifrx_resume )
1063
+ SYSTEM_SLEEP_PM_OPS (stm32_spdifrx_suspend , stm32_spdifrx_resume )
1066
1064
};
1067
1065
1068
1066
static struct platform_driver stm32_spdifrx_driver = {
1069
1067
.driver = {
1070
1068
.name = "st,stm32-spdifrx" ,
1071
1069
.of_match_table = stm32_spdifrx_ids ,
1072
- .pm = & stm32_spdifrx_pm_ops ,
1070
+ .pm = pm_ptr ( & stm32_spdifrx_pm_ops ) ,
1073
1071
},
1074
1072
.probe = stm32_spdifrx_probe ,
1075
1073
.remove = stm32_spdifrx_remove ,
You can’t perform that action at this time.
0 commit comments