Skip to content

Commit f3f9dfd

Browse files
committed
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 <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 5ea0a22 commit f3f9dfd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

sound/pci/vx222/vx222.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ static int snd_vx222_probe(struct pci_dev *pci,
204204
return 0;
205205
}
206206

207-
#ifdef CONFIG_PM_SLEEP
208207
static int snd_vx222_suspend(struct device *dev)
209208
{
210209
struct snd_card *card = dev_get_drvdata(dev);
@@ -221,18 +220,14 @@ static int snd_vx222_resume(struct device *dev)
221220
return snd_vx_resume(&vx->core);
222221
}
223222

224-
static SIMPLE_DEV_PM_OPS(snd_vx222_pm, snd_vx222_suspend, snd_vx222_resume);
225-
#define SND_VX222_PM_OPS &snd_vx222_pm
226-
#else
227-
#define SND_VX222_PM_OPS NULL
228-
#endif
223+
static DEFINE_SIMPLE_DEV_PM_OPS(snd_vx222_pm, snd_vx222_suspend, snd_vx222_resume);
229224

230225
static struct pci_driver vx222_driver = {
231226
.name = KBUILD_MODNAME,
232227
.id_table = snd_vx222_ids,
233228
.probe = snd_vx222_probe,
234229
.driver = {
235-
.pm = SND_VX222_PM_OPS,
230+
.pm = pm_ptr(&snd_vx222_pm),
236231
},
237232
};
238233

0 commit comments

Comments
 (0)