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

ASoC: SOF: pci: 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-79-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Takashi Iwai and committed by
Mark Brown
24df03e2 40456c8e

+17 -18
+1 -1
sound/soc/sof/amd/pci-acp63.c
··· 104 104 .probe = acp63_pci_probe, 105 105 .remove = acp63_pci_remove, 106 106 .driver = { 107 - .pm = &sof_pci_pm, 107 + .pm = pm_ptr(&sof_pci_pm), 108 108 }, 109 109 }; 110 110 module_pci_driver(snd_sof_pci_amd_acp63_driver);
+1 -1
sound/soc/sof/amd/pci-acp70.c
··· 100 100 .probe = acp70_pci_probe, 101 101 .remove = acp70_pci_remove, 102 102 .driver = { 103 - .pm = &sof_pci_pm, 103 + .pm = pm_ptr(&sof_pci_pm), 104 104 }, 105 105 }; 106 106 module_pci_driver(snd_sof_pci_amd_acp70_driver);
+1 -1
sound/soc/sof/amd/pci-rn.c
··· 97 97 .probe = acp_pci_rn_probe, 98 98 .remove = acp_pci_rn_remove, 99 99 .driver = { 100 - .pm = &sof_pci_pm, 100 + .pm = pm_ptr(&sof_pci_pm), 101 101 }, 102 102 }; 103 103 module_pci_driver(snd_sof_pci_amd_rn_driver);
+1 -1
sound/soc/sof/amd/pci-vangogh.c
··· 90 90 .probe = acp_pci_vgh_probe, 91 91 .remove = acp_pci_vgh_remove, 92 92 .driver = { 93 - .pm = &sof_pci_pm, 93 + .pm = pm_ptr(&sof_pci_pm), 94 94 }, 95 95 }; 96 96 module_pci_driver(snd_sof_pci_amd_vgh_driver);
+1 -1
sound/soc/sof/intel/pci-apl.c
··· 99 99 .remove = sof_pci_remove, 100 100 .shutdown = sof_pci_shutdown, 101 101 .driver = { 102 - .pm = &sof_pci_pm, 102 + .pm = pm_ptr(&sof_pci_pm), 103 103 }, 104 104 }; 105 105 module_pci_driver(snd_sof_pci_intel_apl_driver);
+1 -1
sound/soc/sof/intel/pci-cnl.c
··· 137 137 .remove = sof_pci_remove, 138 138 .shutdown = sof_pci_shutdown, 139 139 .driver = { 140 - .pm = &sof_pci_pm, 140 + .pm = pm_ptr(&sof_pci_pm), 141 141 }, 142 142 }; 143 143 module_pci_driver(snd_sof_pci_intel_cnl_driver);
+1 -1
sound/soc/sof/intel/pci-icl.c
··· 102 102 .remove = sof_pci_remove, 103 103 .shutdown = sof_pci_shutdown, 104 104 .driver = { 105 - .pm = &sof_pci_pm, 105 + .pm = pm_ptr(&sof_pci_pm), 106 106 }, 107 107 }; 108 108 module_pci_driver(snd_sof_pci_intel_icl_driver);
+1 -1
sound/soc/sof/intel/pci-lnl.c
··· 72 72 .remove = sof_pci_remove, 73 73 .shutdown = sof_pci_shutdown, 74 74 .driver = { 75 - .pm = &sof_pci_pm, 75 + .pm = pm_ptr(&sof_pci_pm), 76 76 }, 77 77 }; 78 78 module_pci_driver(snd_sof_pci_intel_lnl_driver);
+1 -1
sound/soc/sof/intel/pci-mtl.c
··· 135 135 .remove = sof_pci_remove, 136 136 .shutdown = sof_pci_shutdown, 137 137 .driver = { 138 - .pm = &sof_pci_pm, 138 + .pm = pm_ptr(&sof_pci_pm), 139 139 }, 140 140 }; 141 141 module_pci_driver(snd_sof_pci_intel_mtl_driver);
+1 -1
sound/soc/sof/intel/pci-ptl.c
··· 71 71 .remove = sof_pci_remove, 72 72 .shutdown = sof_pci_shutdown, 73 73 .driver = { 74 - .pm = &sof_pci_pm, 74 + .pm = pm_ptr(&sof_pci_pm), 75 75 }, 76 76 }; 77 77 module_pci_driver(snd_sof_pci_intel_ptl_driver);
+1 -1
sound/soc/sof/intel/pci-skl.c
··· 83 83 .remove = sof_pci_remove, 84 84 .shutdown = sof_pci_shutdown, 85 85 .driver = { 86 - .pm = &sof_pci_pm, 86 + .pm = pm_ptr(&sof_pci_pm), 87 87 }, 88 88 }; 89 89 module_pci_driver(snd_sof_pci_intel_skl_driver);
+1 -1
sound/soc/sof/intel/pci-tgl.c
··· 311 311 .remove = sof_pci_remove, 312 312 .shutdown = sof_pci_shutdown, 313 313 .driver = { 314 - .pm = &sof_pci_pm, 314 + .pm = pm_ptr(&sof_pci_pm), 315 315 }, 316 316 }; 317 317 module_pci_driver(snd_sof_pci_intel_tgl_driver);
+1 -1
sound/soc/sof/intel/pci-tng.c
··· 238 238 .remove = sof_pci_remove, 239 239 .shutdown = sof_pci_shutdown, 240 240 .driver = { 241 - .pm = &sof_pci_pm, 241 + .pm = pm_ptr(&sof_pci_pm), 242 242 }, 243 243 }; 244 244 module_pci_driver(snd_sof_pci_intel_tng_driver);
+4 -5
sound/soc/sof/sof-pci-dev.c
··· 155 155 {}, 156 156 }; 157 157 158 - const struct dev_pm_ops sof_pci_pm = { 158 + EXPORT_NS_DEV_PM_OPS(sof_pci_pm, SND_SOC_SOF_PCI_DEV) = { 159 159 .prepare = snd_sof_prepare, 160 160 .complete = snd_sof_complete, 161 - SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 162 - SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 163 - snd_sof_runtime_idle) 161 + SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) 162 + RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, 163 + snd_sof_runtime_idle) 164 164 }; 165 - EXPORT_SYMBOL_NS(sof_pci_pm, "SND_SOC_SOF_PCI_DEV"); 166 165 167 166 static void sof_pci_probe_complete(struct device *dev) 168 167 {