summaryrefslogtreecommitdiff
path: root/sound/pci/als300.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-02-07 16:51:15 +0100
committerTakashi Iwai <tiwai@suse.de>2024-02-12 11:50:24 +0100
commit7aa8073066b74e20d9a5b92ab30b714fc5c4da26 (patch)
treed3018dc17b71acb13b705cadea8b169e87fa7acd /sound/pci/als300.c
parent19e332e50219412d417c0c79efdd4d3db9c633da (diff)
ALSA: als300: 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-5-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/als300.c')
-rw-r--r--sound/pci/als300.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index c70aff060120..c7c481203ef8 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -654,7 +654,6 @@ static int snd_als300_create(struct snd_card *card,
return 0;
}
-#ifdef CONFIG_PM_SLEEP
static int snd_als300_suspend(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
@@ -677,11 +676,7 @@ static int snd_als300_resume(struct device *dev)
return 0;
}
-static SIMPLE_DEV_PM_OPS(snd_als300_pm, snd_als300_suspend, snd_als300_resume);
-#define SND_ALS300_PM_OPS &snd_als300_pm
-#else
-#define SND_ALS300_PM_OPS NULL
-#endif
+static DEFINE_SIMPLE_DEV_PM_OPS(snd_als300_pm, snd_als300_suspend, snd_als300_resume);
static int snd_als300_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
@@ -739,7 +734,7 @@ static struct pci_driver als300_driver = {
.id_table = snd_als300_ids,
.probe = snd_als300_probe,
.driver = {
- .pm = SND_ALS300_PM_OPS,
+ .pm = &snd_als300_pm,
},
};