diff options
author | Dave Jones <davej@redhat.com> | 2006-12-12 18:13:32 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-12-12 18:13:32 -0500 |
commit | f0eef25339f92f7cd4aeea23d9ae97987a5a1e82 (patch) | |
tree | 2472e94d39f43a9580a6d2d5d92de0b749023263 /sound/pci/als300.c | |
parent | 0cfea5dd98205f2fa318836da664a7d7df1afbc1 (diff) | |
parent | e1036502e5263851259d147771226161e5ccc85a (diff) |
Merge ../linus
Diffstat (limited to 'sound/pci/als300.c')
-rw-r--r-- | sound/pci/als300.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 96cfb8ae505..95f70f3cc37 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c @@ -204,8 +204,7 @@ static int snd_als300_dev_free(struct snd_device *device) return snd_als300_free(chip); } -static irqreturn_t snd_als300_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t snd_als300_interrupt(int irq, void *dev_id) { u8 status; struct snd_als300 *chip = dev_id; @@ -236,8 +235,7 @@ static irqreturn_t snd_als300_interrupt(int irq, void *dev_id, return IRQ_HANDLED; } -static irqreturn_t snd_als300plus_interrupt(int irq, void *dev_id, - struct pt_regs *regs) +static irqreturn_t snd_als300plus_interrupt(int irq, void *dev_id) { u8 general, mpu, dram; struct snd_als300 *chip = dev_id; @@ -770,9 +768,9 @@ static int snd_als300_suspend(struct pci_dev *pci, pm_message_t state) snd_pcm_suspend_all(chip->pcm); snd_ac97_suspend(chip->ac97); - 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; } @@ -781,9 +779,14 @@ static int snd_als300_resume(struct pci_dev *pci) struct snd_card *card = pci_get_drvdata(pci); struct snd_als300 *chip = card->private_data; - 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 "als300: pci_enable_device failed, " + "disabling device\n"); + snd_card_disconnect(card); + return -EIO; + } pci_set_master(pci); snd_als300_init(chip); |