]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ALSA: pcm: Convert to SYSTEM_SLEEP_PM_OPS()
authorTakashi Iwai <tiwai@suse.de>
Thu, 13 Mar 2025 17:07:21 +0000 (18:07 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Mar 2025 10:07:13 +0000 (11:07 +0100)
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 <tiwai@suse.de>
Link: https://patch.msgid.link/20250313170731.26943-4-tiwai@suse.de
sound/core/pcm.c

index 290690fc2abcbbf7cfc4ffcbcd4769d281e64808..283aac441fa0a7b1ddfdfc66ab66a2a48329f0f9 100644 (file)
@@ -592,7 +592,6 @@ static const struct attribute_group *pcm_dev_attr_groups[];
  * PM callbacks: we need to deal only with suspend here, as the resume is
  * triggered either from user-space or the driver's resume callback
  */
-#ifdef CONFIG_PM_SLEEP
 static int do_pcm_suspend(struct device *dev)
 {
        struct snd_pcm_str *pstr = dev_get_drvdata(dev);
@@ -601,10 +600,9 @@ static int do_pcm_suspend(struct device *dev)
                snd_pcm_suspend_all(pstr->pcm);
        return 0;
 }
-#endif
 
 static const struct dev_pm_ops pcm_dev_pm_ops = {
-       SET_SYSTEM_SLEEP_PM_OPS(do_pcm_suspend, NULL)
+       SYSTEM_SLEEP_PM_OPS(do_pcm_suspend, NULL)
 };
 
 /* device type for PCM -- basically only for passing PM callbacks */