]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: acpi: Convert to EXPORT_NS_DEV_PM_OPS()
authorTakashi Iwai <tiwai@suse.de>
Mon, 17 Mar 2025 09:55:39 +0000 (10:55 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 17 Mar 2025 10:14:55 +0000 (10:14 +0000)
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>
sound/soc/sof/intel/bdw.c
sound/soc/sof/intel/byt.c
sound/soc/sof/sof-acpi-dev.c

index 79374dcde89f1c675cac3aa64a99b623ded2fd30..f1287d509835be8d7bddbb34b70430b2d8cf98cc 100644 (file)
@@ -686,7 +686,7 @@ static struct platform_driver snd_sof_acpi_intel_bdw_driver = {
        .remove = sof_acpi_remove,
        .driver = {
                .name = "sof-audio-acpi-intel-bdw",
-               .pm = &sof_acpi_pm,
+               .pm = pm_ptr(&sof_acpi_pm),
                .acpi_match_table = sof_broadwell_match,
        },
 };
index 900cc10a3b7f587ddec71136eec41f84da820be4..18208f77b84dc6a1959634706b432c7f23fd7a5b 100644 (file)
@@ -467,7 +467,7 @@ static struct platform_driver snd_sof_acpi_intel_byt_driver = {
        .remove = sof_acpi_remove,
        .driver = {
                .name = "sof-audio-acpi-intel-byt",
-               .pm = &sof_acpi_pm,
+               .pm = pm_ptr(&sof_acpi_pm),
                .acpi_match_table = sof_baytrail_match,
        },
 };
index 58fd5f7c790540f1e9f491a5d4f7616127b7cba0..68bf1b57093e4d4f86227525c15d6ce19cc5db96 100644 (file)
@@ -36,12 +36,11 @@ MODULE_PARM_DESC(sof_acpi_debug, "SOF ACPI debug options (0x0 all off)");
 
 #define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0)
 
-const struct dev_pm_ops sof_acpi_pm = {
-       SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
-       SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
-                          snd_sof_runtime_idle)
+EXPORT_NS_DEV_PM_OPS(sof_acpi_pm, SND_SOC_SOF_ACPI_DEV) = {
+       SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
+       RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
+                      snd_sof_runtime_idle)
 };
-EXPORT_SYMBOL_NS(sof_acpi_pm, "SND_SOC_SOF_ACPI_DEV");
 
 static void sof_acpi_probe_complete(struct device *dev)
 {