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>
This commit is contained in:
Takashi Iwai
2025-03-17 10:55:40 +01:00
committed by Mark Brown
parent 40456c8e7b
commit 24df03e2b4
14 changed files with 17 additions and 18 deletions

View File

@@ -155,14 +155,13 @@ static const struct dmi_system_id community_key_platforms[] = {
{},
};
const struct dev_pm_ops sof_pci_pm = {
EXPORT_NS_DEV_PM_OPS(sof_pci_pm, SND_SOC_SOF_PCI_DEV) = {
.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,
snd_sof_runtime_idle)
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_pci_pm, "SND_SOC_SOF_PCI_DEV");
static void sof_pci_probe_complete(struct device *dev)
{