Skip to content

Commit f8d952c

Browse files
tiwaibroonie
authored andcommitted
ASoC: SOF: of: Convert to EXPORT_DEV_PM_OPS()
Use the newer EXPORT_DEV_PM_OPS() macro together with pm_ptr(). This optimizes slightly when CONFIG_PM is disabled, too. Cc: [email protected] Signed-off-by: Takashi Iwai <[email protected]> Reviewed-by: Charles Keepax <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 24df03e commit f8d952c

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

sound/soc/sof/imx/imx8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static struct platform_driver snd_sof_of_imx8_driver = {
456456
.remove = sof_of_remove,
457457
.driver = {
458458
.name = "sof-audio-of-imx8",
459-
.pm = &sof_of_pm,
459+
.pm = pm_ptr(&sof_of_pm),
460460
.of_match_table = sof_of_imx8_ids,
461461
},
462462
};

sound/soc/sof/imx/imx9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static struct platform_driver snd_sof_of_imx9_driver = {
126126
.remove = sof_of_remove,
127127
.driver = {
128128
.name = "sof-audio-of-imx9",
129-
.pm = &sof_of_pm,
129+
.pm = pm_ptr(&sof_of_pm),
130130
.of_match_table = sof_of_imx9_ids,
131131
},
132132
};

sound/soc/sof/mediatek/mt8186/mt8186.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ static struct platform_driver snd_sof_of_mt8186_driver = {
660660
.shutdown = sof_of_shutdown,
661661
.driver = {
662662
.name = "sof-audio-of-mt8186",
663-
.pm = &sof_of_pm,
663+
.pm = pm_ptr(&sof_of_pm),
664664
.of_match_table = sof_of_mt8186_ids,
665665
},
666666
};

sound/soc/sof/mediatek/mt8195/mt8195.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static struct platform_driver snd_sof_of_mt8195_driver = {
616616
.shutdown = sof_of_shutdown,
617617
.driver = {
618618
.name = "sof-audio-of-mt8195",
619-
.pm = &sof_of_pm,
619+
.pm = pm_ptr(&sof_of_pm),
620620
.of_match_table = sof_of_mt8195_ids,
621621
},
622622
};

sound/soc/sof/sof-of-dev.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ static char *tplg_filename;
3030
module_param(tplg_filename, charp, 0444);
3131
MODULE_PARM_DESC(tplg_filename, "deprecated - moved to snd-sof module.");
3232

33-
const struct dev_pm_ops sof_of_pm = {
33+
EXPORT_DEV_PM_OPS(sof_of_pm) = {
3434
.prepare = snd_sof_prepare,
3535
.complete = snd_sof_complete,
36-
SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
37-
SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
38-
NULL)
36+
SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
37+
RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, NULL)
3938
};
40-
EXPORT_SYMBOL(sof_of_pm);
4139

4240
static void sof_of_probe_complete(struct device *dev)
4341
{

0 commit comments

Comments
 (0)