diff options
author | Takashi Iwai <tiwai@suse.de> | 2025-03-13 20:07:26 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2025-03-14 13:07:13 +0300 |
commit | f3f9dfde4c88b5db21b350dd61cc913ec16c5f6c (patch) | |
tree | 82c84f5ca81c82c7b33710eb220bdb9292265da7 | |
parent | 5ea0a2206b58356779cc686630b6548a3402991c (diff) | |
download | linux-f3f9dfde4c88b5db21b350dd61cc913ec16c5f6c.tar.xz |
ALSA: vx222: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Use the newer DEFINE_SIMPLE_DEV_PM_OPS() macro instead of
SIMPLE_DEV_PM_OPS() together with pm_ptr(), which makes
CONFIG_PM_SLEEP ifdefs superfluous.
Merely a cleanup, there should be no actual code change.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250313170731.26943-9-tiwai@suse.de
-rw-r--r-- | sound/pci/vx222/vx222.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index 468a6a20dc1e..fdb039896205 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c @@ -204,7 +204,6 @@ static int snd_vx222_probe(struct pci_dev *pci, return 0; } -#ifdef CONFIG_PM_SLEEP static int snd_vx222_suspend(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); @@ -221,18 +220,14 @@ static int snd_vx222_resume(struct device *dev) return snd_vx_resume(&vx->core); } -static SIMPLE_DEV_PM_OPS(snd_vx222_pm, snd_vx222_suspend, snd_vx222_resume); -#define SND_VX222_PM_OPS &snd_vx222_pm -#else -#define SND_VX222_PM_OPS NULL -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(snd_vx222_pm, snd_vx222_suspend, snd_vx222_resume); static struct pci_driver vx222_driver = { .name = KBUILD_MODNAME, .id_table = snd_vx222_ids, .probe = snd_vx222_probe, .driver = { - .pm = SND_VX222_PM_OPS, + .pm = pm_ptr(&snd_vx222_pm), }, }; |