aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-01-08 04:05:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:14:09 -0500
commit86f91d36c2aac910b7cf7e5d047019b10a9a627e (patch)
treecc6d5b8d0277e8057f7b337dc09bf21553fbd705 /sound/oss
parent96e9dd14a3b2aab4098503a5999ee2ef42d82da1 (diff)
[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')
-rw-r--r--sound/oss/i810_audio.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
index b9a640fe48b1..4600cd6742ce 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
3359 goto out_region2; 3359 goto out_region2;
3360 } 3360 }
3361 3361
3362 if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ,
3363 card_names[pci_id->driver_data], card)) {
3364 printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq);
3365 goto out_pio;
3366 }
3367
3368 if (card->use_mmio) { 3362 if (card->use_mmio) {
3369 if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio MMBAR")) { 3363 if (request_mem_region(card->ac97base_mmio_phys, 512, "ich_audio MMBAR")) {
3370 if ((card->ac97base_mmio = ioremap(card->ac97base_mmio_phys, 512))) { /*@FIXME can ioremap fail? don't know (jsaw) */ 3364 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
3395 } 3389 }
3396 3390
3397 /* initialize AC97 codec and register /dev/mixer */ 3391 /* initialize AC97 codec and register /dev/mixer */
3398 if (i810_ac97_init(card) <= 0) { 3392 if (i810_ac97_init(card) <= 0)
3399 free_irq(card->irq, card);
3400 goto out_iospace; 3393 goto out_iospace;
3401 }
3402 pci_set_drvdata(pci_dev, card); 3394 pci_set_drvdata(pci_dev, card);
3403 3395
3404 if(clocking == 0) { 3396 if(clocking == 0) {
@@ -3410,7 +3402,6 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device
3410 if ((card->dev_audio = register_sound_dsp(&i810_audio_fops, -1)) < 0) { 3402 if ((card->dev_audio = register_sound_dsp(&i810_audio_fops, -1)) < 0) {
3411 int i; 3403 int i;
3412 printk(KERN_ERR "i810_audio: couldn't register DSP device!\n"); 3404 printk(KERN_ERR "i810_audio: couldn't register DSP device!\n");
3413 free_irq(card->irq, card);
3414 for (i = 0; i < NR_AC97; i++) 3405 for (i = 0; i < NR_AC97; i++)
3415 if (card->ac97_codec[i] != NULL) { 3406 if (card->ac97_codec[i] != NULL) {
3416 unregister_sound_mixer(card->ac97_codec[i]->dev_mixer); 3407 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
3419 goto out_iospace; 3410 goto out_iospace;
3420 } 3411 }
3421 3412
3413 if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ,
3414 card_names[pci_id->driver_data], card)) {
3415 printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq);
3416 goto out_iospace;
3417 }
3418
3419
3422 card->initializing = 0; 3420 card->initializing = 0;
3423 return 0; 3421 return 0;
3424 3422