diff options
author | Tasos Sahanidis <tasos@tasossah.com> | 2023-03-29 06:14:37 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-03-29 08:28:00 +0200 |
commit | 081364d7039395d5759dda17f6904d7e99d39f4b (patch) | |
tree | 6b667c4b364703f7e1ecd5474640b0559cdf93b2 /sound/pci/ymfpci/ymfpci_main.c | |
parent | ALSA: ymfpci: Add error messages for abritrary IO ports on older chips (diff) | |
download | linux-081364d7039395d5759dda17f6904d7e99d39f4b.tar.xz linux-081364d7039395d5759dda17f6904d7e99d39f4b.zip |
ALSA: ymfpci: Switch to DEFINE_SIMPLE_DEV_PM_OPS()
Since commit 1a3c7bb08826 ("PM: core: Add new *_PM_OPS macros, deprecate
old ones") SIMPLE_DEV_PM_OPS has been marked deprecated.
The intent is to remove CONFIG_PM_SLEEP guards for PM callbacks. As such
the ifdefs are now removed.
Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Link: https://lore.kernel.org/r/20230329041440.177363-2-tasos@tasossah.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index 2858736ed20a..6d13f41527dd 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c @@ -2220,7 +2220,6 @@ static void snd_ymfpci_free(struct snd_card *card) release_firmware(chip->controller_microcode); } -#ifdef CONFIG_PM_SLEEP static const int saved_regs_index[] = { /* spdif */ YDSXGR_SPDIFOUTCTRL, @@ -2304,8 +2303,7 @@ static int snd_ymfpci_resume(struct device *dev) return 0; } -SIMPLE_DEV_PM_OPS(snd_ymfpci_pm, snd_ymfpci_suspend, snd_ymfpci_resume); -#endif /* CONFIG_PM_SLEEP */ +DEFINE_SIMPLE_DEV_PM_OPS(snd_ymfpci_pm, snd_ymfpci_suspend, snd_ymfpci_resume); int snd_ymfpci_create(struct snd_card *card, struct pci_dev *pci, @@ -2374,12 +2372,10 @@ int snd_ymfpci_create(struct snd_card *card, if (err < 0) return err; -#ifdef CONFIG_PM_SLEEP chip->saved_regs = devm_kmalloc_array(&pci->dev, YDSXGR_NUM_SAVED_REGS, sizeof(u32), GFP_KERNEL); if (!chip->saved_regs) return -ENOMEM; -#endif snd_ymfpci_proc_init(card, chip); |