diff options
Diffstat (limited to 'sound/pci/nm256')
-rw-r--r-- | sound/pci/nm256/nm256.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index b1bbdb9e3b7b..945d21bf187e 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -1390,6 +1390,7 @@ static int nm256_suspend(struct pci_dev *pci, pm_message_t state) | |||
1390 | chip->coeffs_current = 0; | 1390 | chip->coeffs_current = 0; |
1391 | pci_disable_device(pci); | 1391 | pci_disable_device(pci); |
1392 | pci_save_state(pci); | 1392 | pci_save_state(pci); |
1393 | pci_set_power_state(pci, pci_choose_state(pci, state)); | ||
1393 | return 0; | 1394 | return 0; |
1394 | } | 1395 | } |
1395 | 1396 | ||
@@ -1401,8 +1402,17 @@ static int nm256_resume(struct pci_dev *pci) | |||
1401 | 1402 | ||
1402 | /* Perform a full reset on the hardware */ | 1403 | /* Perform a full reset on the hardware */ |
1403 | chip->in_resume = 1; | 1404 | chip->in_resume = 1; |
1405 | |||
1406 | pci_set_power_state(pci, PCI_D0); | ||
1404 | pci_restore_state(pci); | 1407 | pci_restore_state(pci); |
1405 | pci_enable_device(pci); | 1408 | if (pci_enable_device(pci) < 0) { |
1409 | printk(KERN_ERR "nm256: pci_enable_device failed, " | ||
1410 | "disabling device\n"); | ||
1411 | snd_card_disconnect(card); | ||
1412 | return -EIO; | ||
1413 | } | ||
1414 | pci_set_master(pci); | ||
1415 | |||
1406 | snd_nm256_init_chip(chip); | 1416 | snd_nm256_init_chip(chip); |
1407 | 1417 | ||
1408 | /* restore ac97 */ | 1418 | /* restore ac97 */ |