Skip to content

Commit 0d8dfeb

Browse files
committed
ALSA: pcm: Convert to SYSTEM_SLEEP_PM_OPS()
Use the newer SYSTEM_SLEEP_PM_OPS() macro instead of SET_SYSTEM_SLEEP_PM_OPS(), which makes CONFIG_PM_SLEEP ifdefs superfluous. Merely a cleanup, there should be no actual code change. Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 4c60cf8 commit 0d8dfeb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sound/core/pcm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,6 @@ static const struct attribute_group *pcm_dev_attr_groups[];
592592
* PM callbacks: we need to deal only with suspend here, as the resume is
593593
* triggered either from user-space or the driver's resume callback
594594
*/
595-
#ifdef CONFIG_PM_SLEEP
596595
static int do_pcm_suspend(struct device *dev)
597596
{
598597
struct snd_pcm_str *pstr = dev_get_drvdata(dev);
@@ -601,10 +600,9 @@ static int do_pcm_suspend(struct device *dev)
601600
snd_pcm_suspend_all(pstr->pcm);
602601
return 0;
603602
}
604-
#endif
605603

606604
static const struct dev_pm_ops pcm_dev_pm_ops = {
607-
SET_SYSTEM_SLEEP_PM_OPS(do_pcm_suspend, NULL)
605+
SYSTEM_SLEEP_PM_OPS(do_pcm_suspend, NULL)
608606
};
609607

610608
/* device type for PCM -- basically only for passing PM callbacks */

0 commit comments

Comments
 (0)