diff options
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r-- | sound/pci/via82xx.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index e6990e0bbf23..92b0736c0fdb 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -2185,9 +2185,9 @@ static int snd_via82xx_suspend(struct pci_dev *pci, pm_message_t state) | |||
2185 | chip->capture_src_saved[1] = inb(chip->port + VIA_REG_CAPTURE_CHANNEL + 0x10); | 2185 | chip->capture_src_saved[1] = inb(chip->port + VIA_REG_CAPTURE_CHANNEL + 0x10); |
2186 | } | 2186 | } |
2187 | 2187 | ||
2188 | pci_set_power_state(pci, PCI_D3hot); | ||
2189 | pci_disable_device(pci); | 2188 | pci_disable_device(pci); |
2190 | pci_save_state(pci); | 2189 | pci_save_state(pci); |
2190 | pci_set_power_state(pci, pci_choose_state(pci, state)); | ||
2191 | return 0; | 2191 | return 0; |
2192 | } | 2192 | } |
2193 | 2193 | ||
@@ -2197,9 +2197,15 @@ static int snd_via82xx_resume(struct pci_dev *pci) | |||
2197 | struct via82xx *chip = card->private_data; | 2197 | struct via82xx *chip = card->private_data; |
2198 | int i; | 2198 | int i; |
2199 | 2199 | ||
2200 | pci_restore_state(pci); | ||
2201 | pci_enable_device(pci); | ||
2202 | pci_set_power_state(pci, PCI_D0); | 2200 | pci_set_power_state(pci, PCI_D0); |
2201 | pci_restore_state(pci); | ||
2202 | if (pci_enable_device(pci) < 0) { | ||
2203 | printk(KERN_ERR "via82xx: pci_enable_device failed, " | ||
2204 | "disabling device\n"); | ||
2205 | snd_card_disconnect(card); | ||
2206 | return -EIO; | ||
2207 | } | ||
2208 | pci_set_master(pci); | ||
2203 | 2209 | ||
2204 | snd_via82xx_chip_init(chip); | 2210 | snd_via82xx_chip_init(chip); |
2205 | 2211 | ||