Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: acpi: Convert to EXPORT_NS_DEV_PM_OPS()

Use the newer EXPORT_NS_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>
Link: https://patch.msgid.link/20250317095603.20073-78-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
40456c8e 692fc8ac

+6 -7
+1 -1
sound/soc/sof/intel/bdw.c
··· 686 686 .remove = sof_acpi_remove, 687 687 .driver = { 688 688 .name = "sof-audio-acpi-intel-bdw", 689 - .pm = &sof_acpi_pm, 689 + .pm = pm_ptr(&sof_acpi_pm), 690 690 .acpi_match_table = sof_broadwell_match, 691 691 }, 692 692 };
+1 -1
sound/soc/sof/intel/byt.c
··· 467 467 .remove = sof_acpi_remove, 468 468 .driver = { 469 469 .name = "sof-audio-acpi-intel-byt", 470 - .pm = &sof_acpi_pm, 470 + .pm = pm_ptr(&sof_acpi_pm), 471 471 .acpi_match_table = sof_baytrail_match, 472 472 }, 473 473 };
+4 -5
sound/soc/sof/sof-acpi-dev.c
··· 36 36 37 37 #define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0) 38 38 39 - const struct dev_pm_ops sof_acpi_pm = { 40 - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 41 - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 42 - snd_sof_runtime_idle) 39 + EXPORT_NS_DEV_PM_OPS(sof_acpi_pm, SND_SOC_SOF_ACPI_DEV) = { 40 + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 41 + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 42 + snd_sof_runtime_idle) 43 43 }; 44 - EXPORT_SYMBOL_NS(sof_acpi_pm, "SND_SOC_SOF_ACPI_DEV"); 45 44 46 45 static void sof_acpi_probe_complete(struct device *dev) 47 46 {