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: 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:
parent
40456c8e7b
commit
24df03e2b4
14 changed files with 17 additions and 18 deletions
|
@ -104,7 +104,7 @@ static struct pci_driver snd_sof_pci_amd_acp63_driver = {
|
|||
.probe = acp63_pci_probe,
|
||||
.remove = acp63_pci_remove,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_amd_acp63_driver);
|
||||
|
|
|
@ -100,7 +100,7 @@ static struct pci_driver snd_sof_pci_amd_acp70_driver = {
|
|||
.probe = acp70_pci_probe,
|
||||
.remove = acp70_pci_remove,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_amd_acp70_driver);
|
||||
|
|
|
@ -97,7 +97,7 @@ static struct pci_driver snd_sof_pci_amd_rn_driver = {
|
|||
.probe = acp_pci_rn_probe,
|
||||
.remove = acp_pci_rn_remove,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_amd_rn_driver);
|
||||
|
|
|
@ -90,7 +90,7 @@ static struct pci_driver snd_sof_pci_amd_vgh_driver = {
|
|||
.probe = acp_pci_vgh_probe,
|
||||
.remove = acp_pci_vgh_remove,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_amd_vgh_driver);
|
||||
|
|
|
@ -99,7 +99,7 @@ static struct pci_driver snd_sof_pci_intel_apl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_apl_driver);
|
||||
|
|
|
@ -137,7 +137,7 @@ static struct pci_driver snd_sof_pci_intel_cnl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_cnl_driver);
|
||||
|
|
|
@ -102,7 +102,7 @@ static struct pci_driver snd_sof_pci_intel_icl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_icl_driver);
|
||||
|
|
|
@ -72,7 +72,7 @@ static struct pci_driver snd_sof_pci_intel_lnl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_lnl_driver);
|
||||
|
|
|
@ -135,7 +135,7 @@ static struct pci_driver snd_sof_pci_intel_mtl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_mtl_driver);
|
||||
|
|
|
@ -71,7 +71,7 @@ static struct pci_driver snd_sof_pci_intel_ptl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_ptl_driver);
|
||||
|
|
|
@ -83,7 +83,7 @@ static struct pci_driver snd_sof_pci_intel_skl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_skl_driver);
|
||||
|
|
|
@ -311,7 +311,7 @@ static struct pci_driver snd_sof_pci_intel_tgl_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_tgl_driver);
|
||||
|
|
|
@ -238,7 +238,7 @@ static struct pci_driver snd_sof_pci_intel_tng_driver = {
|
|||
.remove = sof_pci_remove,
|
||||
.shutdown = sof_pci_shutdown,
|
||||
.driver = {
|
||||
.pm = &sof_pci_pm,
|
||||
.pm = pm_ptr(&sof_pci_pm),
|
||||
},
|
||||
};
|
||||
module_pci_driver(snd_sof_pci_intel_tng_driver);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue