File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1352,7 +1352,6 @@ static int stm32_i2s_probe(struct platform_device *pdev)
13521352
13531353MODULE_DEVICE_TABLE (of , stm32_i2s_ids );
13541354
1355- #ifdef CONFIG_PM_SLEEP
13561355static int stm32_i2s_suspend (struct device * dev )
13571356{
13581357 struct stm32_i2s_data * i2s = dev_get_drvdata (dev );
@@ -1370,17 +1369,16 @@ static int stm32_i2s_resume(struct device *dev)
13701369 regcache_cache_only (i2s -> regmap , false);
13711370 return regcache_sync (i2s -> regmap );
13721371}
1373- #endif /* CONFIG_PM_SLEEP */
13741372
13751373static 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 )
13771375};
13781376
13791377static struct platform_driver stm32_i2s_driver = {
13801378 .driver = {
13811379 .name = "st,stm32-i2s" ,
13821380 .of_match_table = stm32_i2s_ids ,
1383- .pm = & stm32_i2s_pm_ops ,
1381+ .pm = pm_ptr ( & stm32_i2s_pm_ops ) ,
13841382 },
13851383 .probe = stm32_i2s_probe ,
13861384 .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)
270270 return devm_of_platform_populate (& pdev -> dev );
271271}
272272
273- #ifdef CONFIG_PM_SLEEP
274273/*
275274 * When pins are shared by two sai sub instances, pins have to be defined
276275 * 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)
305304
306305 return pinctrl_pm_select_default_state (dev );
307306}
308- #endif /* CONFIG_PM_SLEEP */
309307
310308static 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 )
312310};
313311
314312MODULE_DEVICE_TABLE (of , stm32_sai_ids );
@@ -317,7 +315,7 @@ static struct platform_driver stm32_sai_driver = {
317315 .driver = {
318316 .name = "st,stm32-sai" ,
319317 .of_match_table = stm32_sai_ids ,
320- .pm = & stm32_sai_pm_ops ,
318+ .pm = pm_ptr ( & stm32_sai_pm_ops ) ,
321319 },
322320 .probe = stm32_sai_probe ,
323321};
Original file line number Diff line number Diff line change @@ -1704,7 +1704,6 @@ static void stm32_sai_sub_remove(struct platform_device *pdev)
17041704 pm_runtime_disable (& pdev -> dev );
17051705}
17061706
1707- #ifdef CONFIG_PM_SLEEP
17081707static int stm32_sai_sub_suspend (struct device * dev )
17091708{
17101709 struct stm32_sai_sub_data * sai = dev_get_drvdata (dev );
@@ -1738,17 +1737,16 @@ static int stm32_sai_sub_resume(struct device *dev)
17381737
17391738 return ret ;
17401739}
1741- #endif /* CONFIG_PM_SLEEP */
17421740
17431741static 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 )
17451743};
17461744
17471745static struct platform_driver stm32_sai_sub_driver = {
17481746 .driver = {
17491747 .name = "st,stm32-sai-sub" ,
17501748 .of_match_table = stm32_sai_sub_ids ,
1751- .pm = & stm32_sai_sub_pm_ops ,
1749+ .pm = pm_ptr ( & stm32_sai_sub_pm_ops ) ,
17521750 },
17531751 .probe = stm32_sai_sub_probe ,
17541752 .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)
10401040
10411041MODULE_DEVICE_TABLE (of , stm32_spdifrx_ids );
10421042
1043- #ifdef CONFIG_PM_SLEEP
10441043static int stm32_spdifrx_suspend (struct device * dev )
10451044{
10461045 struct stm32_spdifrx_data * spdifrx = dev_get_drvdata (dev );
@@ -1059,17 +1058,16 @@ static int stm32_spdifrx_resume(struct device *dev)
10591058
10601059 return regcache_sync (spdifrx -> regmap );
10611060}
1062- #endif /* CONFIG_PM_SLEEP */
10631061
10641062static 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 )
10661064};
10671065
10681066static struct platform_driver stm32_spdifrx_driver = {
10691067 .driver = {
10701068 .name = "st,stm32-spdifrx" ,
10711069 .of_match_table = stm32_spdifrx_ids ,
1072- .pm = & stm32_spdifrx_pm_ops ,
1070+ .pm = pm_ptr ( & stm32_spdifrx_pm_ops ) ,
10731071 },
10741072 .probe = stm32_spdifrx_probe ,
10751073 .remove = stm32_spdifrx_remove ,
You can’t perform that action at this time.
0 commit comments