summaryrefslogtreecommitdiffstats
path: root/sound/pci/via82xx.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-12-04 15:59:07 +1100
committerPaul Mackerras <paulus@samba.org>2006-12-04 15:59:07 +1100
commit79acbb3ff2d8095b692e1502b9eb2ccec348de26 (patch)
tree6ab773e5a8f9de2cd6443362b21d0d6fffe3b35e /sound/pci/via82xx.c
parent19a79859e168640f8e16d7b216d211c1c52b687a (diff)
parent2b5f6dcce5bf94b9b119e9ed8d537098ec61c3d2 (diff)
downloadop-kernel-dev-79acbb3ff2d8095b692e1502b9eb2ccec348de26.zip
op-kernel-dev-79acbb3ff2d8095b692e1502b9eb2ccec348de26.tar.gz
Merge branch 'linux-2.6' into for-linus
Diffstat (limited to 'sound/pci/via82xx.c')
-rw-r--r--sound/pci/via82xx.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index e6990e0..92b0736 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)
chip->capture_src_saved[1] = inb(chip->port + VIA_REG_CAPTURE_CHANNEL + 0x10);
}
- pci_set_power_state(pci, PCI_D3hot);
pci_disable_device(pci);
pci_save_state(pci);
+ pci_set_power_state(pci, pci_choose_state(pci, state));
return 0;
}
@@ -2197,9 +2197,15 @@ static int snd_via82xx_resume(struct pci_dev *pci)
struct via82xx *chip = card->private_data;
int i;
- pci_restore_state(pci);
- pci_enable_device(pci);
pci_set_power_state(pci, PCI_D0);
+ pci_restore_state(pci);
+ if (pci_enable_device(pci) < 0) {
+ printk(KERN_ERR "via82xx: pci_enable_device failed, "
+ "disabling device\n");
+ snd_card_disconnect(card);
+ return -EIO;
+ }
+ pci_set_master(pci);
snd_via82xx_chip_init(chip);
OpenPOWER on IntegriCloud