mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
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: sound-open-firmware@alsa-project.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250317095603.20073-80-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
24df03e2b4
commit
f8d952c5f7
5 changed files with 7 additions and 9 deletions
|
@ -456,7 +456,7 @@ static struct platform_driver snd_sof_of_imx8_driver = {
|
|||
.remove = sof_of_remove,
|
||||
.driver = {
|
||||
.name = "sof-audio-of-imx8",
|
||||
.pm = &sof_of_pm,
|
||||
.pm = pm_ptr(&sof_of_pm),
|
||||
.of_match_table = sof_of_imx8_ids,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -126,7 +126,7 @@ static struct platform_driver snd_sof_of_imx9_driver = {
|
|||
.remove = sof_of_remove,
|
||||
.driver = {
|
||||
.name = "sof-audio-of-imx9",
|
||||
.pm = &sof_of_pm,
|
||||
.pm = pm_ptr(&sof_of_pm),
|
||||
.of_match_table = sof_of_imx9_ids,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -660,7 +660,7 @@ static struct platform_driver snd_sof_of_mt8186_driver = {
|
|||
.shutdown = sof_of_shutdown,
|
||||
.driver = {
|
||||
.name = "sof-audio-of-mt8186",
|
||||
.pm = &sof_of_pm,
|
||||
.pm = pm_ptr(&sof_of_pm),
|
||||
.of_match_table = sof_of_mt8186_ids,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -616,7 +616,7 @@ static struct platform_driver snd_sof_of_mt8195_driver = {
|
|||
.shutdown = sof_of_shutdown,
|
||||
.driver = {
|
||||
.name = "sof-audio-of-mt8195",
|
||||
.pm = &sof_of_pm,
|
||||
.pm = pm_ptr(&sof_of_pm),
|
||||
.of_match_table = sof_of_mt8195_ids,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -30,14 +30,12 @@ static char *tplg_filename;
|
|||
module_param(tplg_filename, charp, 0444);
|
||||
MODULE_PARM_DESC(tplg_filename, "deprecated - moved to snd-sof module.");
|
||||
|
||||
const struct dev_pm_ops sof_of_pm = {
|
||||
EXPORT_DEV_PM_OPS(sof_of_pm) = {
|
||||
.prepare = snd_sof_prepare,
|
||||
.complete = snd_sof_complete,
|
||||
SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
|
||||
SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
|
||||
NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
|
||||
RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, NULL)
|
||||
};
|
||||
EXPORT_SYMBOL(sof_of_pm);
|
||||
|
||||
static void sof_of_probe_complete(struct device *dev)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue