summaryrefslogtreecommitdiffstats
path: root/sound/drivers
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-02-07 16:51:12 +0100
committerTakashi Iwai <tiwai@suse.de>2024-02-12 11:50:24 +0100
commitdd96516a7d85ded7bfb49f717074be20ad78bad5 (patch)
tree927cfdfc33f6c94093b9eb2c9fa9a05494b3a2ae /sound/drivers
parentd6568e3de42dd971a1356f7ba581e6600d53f0a0 (diff)
downloadlinux-stable-dd96516a7d85ded7bfb49f717074be20ad78bad5.tar.gz
linux-stable-dd96516a7d85ded7bfb49f717074be20ad78bad5.tar.bz2
linux-stable-dd96516a7d85ded7bfb49f717074be20ad78bad5.zip
ALSA: aloop: Replace with DEFINE_SIMPLE_DEV_PM_OPS()
Use the new DEFINE_SIMPLE_DEV_PM_OPS() instead of SIMPLE_DEV_PM_OPS() for code-simplification. We need no longer CONFIG_PM_SLEEP ifdefs. Just a cleanup, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240207155140.18238-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/aloop.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 1c65e0a3b13c..892c4e29c0a3 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -1830,7 +1830,6 @@ static int loopback_probe(struct platform_device *devptr)
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int loopback_suspend(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
@@ -1847,11 +1846,7 @@ static int loopback_resume(struct device *pdev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume);
-#define LOOPBACK_PM_OPS &loopback_pm
-#else
-#define LOOPBACK_PM_OPS NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume);
#define SND_LOOPBACK_DRIVER "snd_aloop"
@@ -1859,7 +1854,7 @@ static struct platform_driver loopback_driver = {
.probe = loopback_probe,
.driver = {
.name = SND_LOOPBACK_DRIVER,
- .pm = LOOPBACK_PM_OPS,
+ .pm = &loopback_pm,
},
};