Skip to content

Commit 40456c8

Browse files
tiwaibroonie
authored andcommitted
ASoC: SOF: acpi: 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: [email protected] Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 692fc8a commit 40456c8

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

sound/soc/sof/intel/bdw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ static struct platform_driver snd_sof_acpi_intel_bdw_driver = {
686686
.remove = sof_acpi_remove,
687687
.driver = {
688688
.name = "sof-audio-acpi-intel-bdw",
689-
.pm = &sof_acpi_pm,
689+
.pm = pm_ptr(&sof_acpi_pm),
690690
.acpi_match_table = sof_broadwell_match,
691691
},
692692
};

sound/soc/sof/intel/byt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ static struct platform_driver snd_sof_acpi_intel_byt_driver = {
467467
.remove = sof_acpi_remove,
468468
.driver = {
469469
.name = "sof-audio-acpi-intel-byt",
470-
.pm = &sof_acpi_pm,
470+
.pm = pm_ptr(&sof_acpi_pm),
471471
.acpi_match_table = sof_baytrail_match,
472472
},
473473
};

sound/soc/sof/sof-acpi-dev.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,11 @@ MODULE_PARM_DESC(sof_acpi_debug, "SOF ACPI debug options (0x0 all off)");
3636

3737
#define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0)
3838

39-
const struct dev_pm_ops sof_acpi_pm = {
40-
SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
41-
SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
42-
snd_sof_runtime_idle)
39+
EXPORT_NS_DEV_PM_OPS(sof_acpi_pm, SND_SOC_SOF_ACPI_DEV) = {
40+
SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
41+
RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
42+
snd_sof_runtime_idle)
4343
};
44-
EXPORT_SYMBOL_NS(sof_acpi_pm, "SND_SOC_SOF_ACPI_DEV");
4544

4645
static void sof_acpi_probe_complete(struct device *dev)
4746
{

0 commit comments

Comments
 (0)