Commit dd96516a authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240207155140.18238-2-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d6568e3d
...@@ -1830,7 +1830,6 @@ static int loopback_probe(struct platform_device *devptr) ...@@ -1830,7 +1830,6 @@ static int loopback_probe(struct platform_device *devptr)
return 0; return 0;
} }
#ifdef CONFIG_PM_SLEEP
static int loopback_suspend(struct device *pdev) static int loopback_suspend(struct device *pdev)
{ {
struct snd_card *card = dev_get_drvdata(pdev); struct snd_card *card = dev_get_drvdata(pdev);
...@@ -1847,11 +1846,7 @@ static int loopback_resume(struct device *pdev) ...@@ -1847,11 +1846,7 @@ static int loopback_resume(struct device *pdev)
return 0; return 0;
} }
static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume); static DEFINE_SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume);
#define LOOPBACK_PM_OPS &loopback_pm
#else
#define LOOPBACK_PM_OPS NULL
#endif
#define SND_LOOPBACK_DRIVER "snd_aloop" #define SND_LOOPBACK_DRIVER "snd_aloop"
...@@ -1859,7 +1854,7 @@ static struct platform_driver loopback_driver = { ...@@ -1859,7 +1854,7 @@ static struct platform_driver loopback_driver = {
.probe = loopback_probe, .probe = loopback_probe,
.driver = { .driver = {
.name = SND_LOOPBACK_DRIVER, .name = SND_LOOPBACK_DRIVER,
.pm = LOOPBACK_PM_OPS, .pm = &loopback_pm,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment