Commit 36cd7671 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: nm256: 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-10-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 13c1b30c
...@@ -1356,7 +1356,6 @@ snd_nm256_peek_for_sig(struct nm256 *chip) ...@@ -1356,7 +1356,6 @@ snd_nm256_peek_for_sig(struct nm256 *chip)
return 0; return 0;
} }
#ifdef CONFIG_PM_SLEEP
/* /*
* APM event handler, so the card is properly reinitialized after a power * APM event handler, so the card is properly reinitialized after a power
* event. * event.
...@@ -1400,11 +1399,7 @@ static int nm256_resume(struct device *dev) ...@@ -1400,11 +1399,7 @@ static int nm256_resume(struct device *dev)
return 0; return 0;
} }
static SIMPLE_DEV_PM_OPS(nm256_pm, nm256_suspend, nm256_resume); static DEFINE_SIMPLE_DEV_PM_OPS(nm256_pm, nm256_suspend, nm256_resume);
#define NM256_PM_OPS &nm256_pm
#else
#define NM256_PM_OPS NULL
#endif /* CONFIG_PM_SLEEP */
static void snd_nm256_free(struct snd_card *card) static void snd_nm256_free(struct snd_card *card)
{ {
...@@ -1660,7 +1655,7 @@ static struct pci_driver nm256_driver = { ...@@ -1660,7 +1655,7 @@ static struct pci_driver nm256_driver = {
.id_table = snd_nm256_ids, .id_table = snd_nm256_ids,
.probe = snd_nm256_probe, .probe = snd_nm256_probe,
.driver = { .driver = {
.pm = NM256_PM_OPS, .pm = &nm256_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