@@ -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)
{
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> --- sound/soc/sof/amd/pci-acp63.c | 2 +- sound/soc/sof/amd/pci-acp70.c | 2 +- sound/soc/sof/amd/pci-rn.c | 2 +- sound/soc/sof/amd/pci-vangogh.c | 2 +- sound/soc/sof/intel/pci-apl.c | 2 +- sound/soc/sof/intel/pci-cnl.c | 2 +- sound/soc/sof/intel/pci-icl.c | 2 +- sound/soc/sof/intel/pci-lnl.c | 2 +- sound/soc/sof/intel/pci-mtl.c | 2 +- sound/soc/sof/intel/pci-ptl.c | 2 +- sound/soc/sof/intel/pci-skl.c | 2 +- sound/soc/sof/intel/pci-tgl.c | 2 +- sound/soc/sof/intel/pci-tng.c | 2 +- sound/soc/sof/sof-pci-dev.c | 9 ++++----- 14 files changed, 17 insertions(+), 18 deletions(-)