[PATCH] 2.6.13-rc4-git3: snd_intel8x0: handle irq_request failure on resume

From: Rafael J. Wysocki
Date: Sun Jul 31 2005 - 05:40:59 EST


Hi,

This patch adds the handling of irq_request() failures during resume to
the snd_intel8x0 driver.

Please consider for applying,
Rafael


Signed-off-by: Rafael J. Wysocki <rjw@xxxxxxx>

--- linux-2.6.13-rc4-git3/sound/pci/intel8x0.c 2005-07-31 12:35:00.000000000 +0200
+++ patched/sound/pci/intel8x0.c 2005-07-31 12:36:10.000000000 +0200
@@ -2390,7 +2390,12 @@ static int intel8x0_resume(snd_card_t *c

pci_enable_device(chip->pci);
pci_set_master(chip->pci);
- request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip);
+ if (request_irq(chip->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) {
+ snd_printk("unable to grab IRQ %d\n", chip->irq);
+ chip->irq = -1;
+ pci_disable_device(chip->pci);
+ return -EBUSY;
+ }
synchronize_irq(chip->irq);
snd_intel8x0_chip_init(chip, 1);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/