diff options
Diffstat (limited to 'sound/pci/vx222')
-rw-r--r-- | sound/pci/vx222/vx222.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index e7cd8acab59a..af49e8aabf55 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -266,9 +266,9 @@ static int snd_vx222_suspend(struct pci_dev *pci, pm_message_t state) | |||
266 | int err; | 266 | int err; |
267 | 267 | ||
268 | err = snd_vx_suspend(&vx->core, state); | 268 | err = snd_vx_suspend(&vx->core, state); |
269 | pci_set_power_state(pci, PCI_D3hot); | ||
270 | pci_disable_device(pci); | 269 | pci_disable_device(pci); |
271 | pci_save_state(pci); | 270 | pci_save_state(pci); |
271 | pci_set_power_state(pci, pci_choose_state(pci, state)); | ||
272 | return err; | 272 | return err; |
273 | } | 273 | } |
274 | 274 | ||
@@ -277,9 +277,14 @@ static int snd_vx222_resume(struct pci_dev *pci) | |||
277 | struct snd_card *card = pci_get_drvdata(pci); | 277 | struct snd_card *card = pci_get_drvdata(pci); |
278 | struct snd_vx222 *vx = card->private_data; | 278 | struct snd_vx222 *vx = card->private_data; |
279 | 279 | ||
280 | pci_restore_state(pci); | ||
281 | pci_enable_device(pci); | ||
282 | pci_set_power_state(pci, PCI_D0); | 280 | pci_set_power_state(pci, PCI_D0); |
281 | pci_restore_state(pci); | ||
282 | if (pci_enable_device(pci) < 0) { | ||
283 | printk(KERN_ERR "vx222: pci_enable_device failed, " | ||
284 | "disabling device\n"); | ||
285 | snd_card_disconnect(card); | ||
286 | return -EIO; | ||
287 | } | ||
283 | pci_set_master(pci); | 288 | pci_set_master(pci); |
284 | return snd_vx_resume(&vx->core); | 289 | return snd_vx_resume(&vx->core); |
285 | } | 290 | } |