Commit ba29abd3 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] Fix other peoples ALSA PCI fixe

irq can be -1 if the card errors during config. synchronize_irq(-1) looks
bad
parent e2eaf3d4
...@@ -1532,6 +1532,7 @@ static int snd_ensoniq_free(ensoniq_t *ensoniq) ...@@ -1532,6 +1532,7 @@ static int snd_ensoniq_free(ensoniq_t *ensoniq)
outl(0, ES_REG(ensoniq, CONTROL)); /* switch everything off */ outl(0, ES_REG(ensoniq, CONTROL)); /* switch everything off */
outl(0, ES_REG(ensoniq, SERIAL)); /* clear serial interface */ outl(0, ES_REG(ensoniq, SERIAL)); /* clear serial interface */
#endif #endif
if(ensoniq->irq >= 0)
synchronize_irq(ensoniq->irq); synchronize_irq(ensoniq->irq);
pci_set_power_state(ensoniq->pci, 3); pci_set_power_state(ensoniq->pci, 3);
__hw_end: __hw_end:
......
...@@ -4070,9 +4070,10 @@ static int snd_ice1712_free(ice1712_t *ice) ...@@ -4070,9 +4070,10 @@ static int snd_ice1712_free(ice1712_t *ice)
/* --- */ /* --- */
__hw_end: __hw_end:
snd_ice1712_proc_done(ice); snd_ice1712_proc_done(ice);
synchronize_irq(); if (ice->irq) {
if (ice->irq) synchronize_irq(ice->irq);
free_irq(ice->irq, (void *) ice); free_irq(ice->irq, (void *) ice);
}
if (ice->res_port) { if (ice->res_port) {
release_resource(ice->res_port); release_resource(ice->res_port);
kfree_nocheck(ice->res_port); kfree_nocheck(ice->res_port);
...@@ -4143,7 +4144,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card, ...@@ -4143,7 +4144,7 @@ static int __devinit snd_ice1712_create(snd_card_t * card,
pci_write_config_word(ice->pci, 0x40, 0x807f); pci_write_config_word(ice->pci, 0x40, 0x807f);
pci_write_config_word(ice->pci, 0x42, 0x0006); pci_write_config_word(ice->pci, 0x42, 0x0006);
snd_ice1712_proc_init(ice); snd_ice1712_proc_init(ice);
synchronize_irq(); synchronize_irq(ice->irq);
if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) { if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) {
snd_ice1712_free(ice); snd_ice1712_free(ice);
......
...@@ -1104,6 +1104,7 @@ static int snd_intel8x0_free(intel8x0_t *chip) ...@@ -1104,6 +1104,7 @@ static int snd_intel8x0_free(intel8x0_t *chip)
outb(ICH_RESETREGS, ICHREG(chip, PO_CR)); outb(ICH_RESETREGS, ICHREG(chip, PO_CR));
outb(ICH_RESETREGS, ICHREG(chip, MC_CR)); outb(ICH_RESETREGS, ICHREG(chip, MC_CR));
/* --- */ /* --- */
if(chip->irq >= 0)
synchronize_irq(chip->irq); synchronize_irq(chip->irq);
__hw_end: __hw_end:
if (chip->bdbars) if (chip->bdbars)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment