diff options
Diffstat (limited to 'sound/pci/nm256/nm256.c')
-rw-r--r-- | sound/pci/nm256/nm256.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 101eee0aa01..945d21bf187 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -236,7 +236,7 @@ struct nm256 { int irq; int irq_acks; - irqreturn_t (*interrupt)(int, void *, struct pt_regs *); + irq_handler_t interrupt; int badintrcount; /* counter to check bogus interrupts */ struct mutex irq_mutex; @@ -1004,7 +1004,7 @@ snd_nm256_intr_check(struct nm256 *chip) */ static irqreturn_t -snd_nm256_interrupt(int irq, void *dev_id, struct pt_regs *dummy) +snd_nm256_interrupt(int irq, void *dev_id) { struct nm256 *chip = dev_id; u16 status; @@ -1069,7 +1069,7 @@ snd_nm256_interrupt(int irq, void *dev_id, struct pt_regs *dummy) */ static irqreturn_t -snd_nm256_interrupt_zx(int irq, void *dev_id, struct pt_regs *dummy) +snd_nm256_interrupt_zx(int irq, void *dev_id) { struct nm256 *chip = dev_id; u32 status; @@ -1390,6 +1390,7 @@ static int nm256_suspend(struct pci_dev *pci, pm_message_t state) chip->coeffs_current = 0; pci_disable_device(pci); pci_save_state(pci); + pci_set_power_state(pci, pci_choose_state(pci, state)); return 0; } @@ -1401,8 +1402,17 @@ static int nm256_resume(struct pci_dev *pci) /* Perform a full reset on the hardware */ chip->in_resume = 1; + + pci_set_power_state(pci, PCI_D0); pci_restore_state(pci); - pci_enable_device(pci); + if (pci_enable_device(pci) < 0) { + printk(KERN_ERR "nm256: pci_enable_device failed, " + "disabling device\n"); + snd_card_disconnect(card); + return -EIO; + } + pci_set_master(pci); + snd_nm256_init_chip(chip); /* restore ac97 */ |