diff options
Diffstat (limited to 'sound/pci/ymfpci/ymfpci_main.c')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index ebc6da89edf3..a40c1085fd20 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -2218,6 +2218,7 @@ int snd_ymfpci_suspend(struct pci_dev *pci, pm_message_t state) | |||
2218 | snd_ymfpci_disable_dsp(chip); | 2218 | snd_ymfpci_disable_dsp(chip); |
2219 | pci_disable_device(pci); | 2219 | pci_disable_device(pci); |
2220 | pci_save_state(pci); | 2220 | pci_save_state(pci); |
2221 | pci_set_power_state(pci, pci_choose_state(pci, state)); | ||
2221 | return 0; | 2222 | return 0; |
2222 | } | 2223 | } |
2223 | 2224 | ||
@@ -2227,8 +2228,14 @@ int snd_ymfpci_resume(struct pci_dev *pci) | |||
2227 | struct snd_ymfpci *chip = card->private_data; | 2228 | struct snd_ymfpci *chip = card->private_data; |
2228 | unsigned int i; | 2229 | unsigned int i; |
2229 | 2230 | ||
2231 | pci_set_power_state(pci, PCI_D0); | ||
2230 | pci_restore_state(pci); | 2232 | pci_restore_state(pci); |
2231 | pci_enable_device(pci); | 2233 | if (pci_enable_device(pci) < 0) { |
2234 | printk(KERN_ERR "ymfpci: pci_enable_device failed, " | ||
2235 | "disabling device\n"); | ||
2236 | snd_card_disconnect(card); | ||
2237 | return -EIO; | ||
2238 | } | ||
2232 | pci_set_master(pci); | 2239 | pci_set_master(pci); |
2233 | snd_ymfpci_aclink_reset(pci); | 2240 | snd_ymfpci_aclink_reset(pci); |
2234 | snd_ymfpci_codec_ready(chip, 0); | 2241 | snd_ymfpci_codec_ready(chip, 0); |