Skip to content

Commit 9335a36

Browse files
committed
ALSA: intel-hdmi-audio: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS() together with pm_ptr(), which allows us dropping ugly __maybe_unused attributes. This optimizes slightly when CONFIG_PM is disabled, too. Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent f3f9dfd commit 9335a36

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sound/x86/intel_hdmi_audio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ static int had_create_jack(struct snd_intelhad *ctx,
16171617
* PM callbacks
16181618
*/
16191619

1620-
static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
1620+
static int hdmi_lpe_audio_suspend(struct device *dev)
16211621
{
16221622
struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
16231623

@@ -1626,7 +1626,7 @@ static int __maybe_unused hdmi_lpe_audio_suspend(struct device *dev)
16261626
return 0;
16271627
}
16281628

1629-
static int __maybe_unused hdmi_lpe_audio_resume(struct device *dev)
1629+
static int hdmi_lpe_audio_resume(struct device *dev)
16301630
{
16311631
struct snd_intelhad_card *card_ctx = dev_get_drvdata(dev);
16321632

@@ -1833,13 +1833,13 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
18331833
}
18341834

18351835
static const struct dev_pm_ops hdmi_lpe_audio_pm = {
1836-
SET_SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume)
1836+
SYSTEM_SLEEP_PM_OPS(hdmi_lpe_audio_suspend, hdmi_lpe_audio_resume)
18371837
};
18381838

18391839
static struct platform_driver hdmi_lpe_audio_driver = {
18401840
.driver = {
18411841
.name = "hdmi-lpe-audio",
1842-
.pm = &hdmi_lpe_audio_pm,
1842+
.pm = pm_ptr(&hdmi_lpe_audio_pm),
18431843
},
18441844
.probe = hdmi_lpe_audio_probe,
18451845
};

0 commit comments

Comments
 (0)