diff options
author | Andrew Morton <akpm@osdl.org> | 2006-01-08 01:05:14 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 20:14:09 -0800 |
commit | 86f91d36c2aac910b7cf7e5d047019b10a9a627e (patch) | |
tree | cc6d5b8d0277e8057f7b337dc09bf21553fbd705 /sound/oss/i810_audio.c | |
parent | 96e9dd14a3b2aab4098503a5999ee2ef42d82da1 (diff) | |
download | op-kernel-dev-86f91d36c2aac910b7cf7e5d047019b10a9a627e.zip op-kernel-dev-86f91d36c2aac910b7cf7e5d047019b10a9a627e.tar.gz |
[PATCH] i810_audio: request_irq() fix
Request the IRQ after having set everything up. Otherwise a shared interrupt
at the right time can kill the machine.
Found this with David Woodhouse <dwmw2@infradead.org>'s
debug-shared-irqs.patch.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/i810_audio.c')
-rw-r--r-- | sound/oss/i810_audio.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index b9a640f..4600cd6 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c @@ -3359,12 +3359,6 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device goto out_region2; } - if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, - card_names[pci_id->driver_data], card)) { - printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); - goto out_pio; - } - if (card->use_mmio) { if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio MMBAR")) { if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys, 512))) { /*@FIXME can ioremap fail? don't know (jsaw) */ @@ -3395,10 +3389,8 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device } /* initialize AC97 codec and register /dev/mixer */ - if (i810_ac97_init(card) <= 0) { - free_irq(card->irq, card); + if (i810_ac97_init(card) <= 0) goto out_iospace; - } pci_set_drvdata(pci_dev, card); if(clocking == 0) { @@ -3410,7 +3402,6 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device if ((card->dev_audio = register_sound_dsp(&i810_audio_fops, -1)) < 0) { int i; printk(KERN_ERR "i810_audio: couldn't register DSP device!\n"); - free_irq(card->irq, card); for (i = 0; i < NR_AC97; i++) if (card->ac97_codec[i] != NULL) { unregister_sound_mixer(card->ac97_codec[i]->dev_mixer); @@ -3419,6 +3410,13 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device goto out_iospace; } + if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, + card_names[pci_id->driver_data], card)) { + printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); + goto out_iospace; + } + + card->initializing = 0; return 0; |