aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-11-21 06:14:23 -0500
committerJaroslav Kysela <perex@server.perex.cz>2006-12-20 02:55:57 -0500
commit437a5a4606c12ab904793a7cad5b2062fc76c04e (patch)
tree57a8b320f931ddd29ecc5933d7f6acc68dc35ef7 /sound/pci/emu10k1
parent01f681da496831eb3aff5a908cefdafe74dd263b (diff)
[ALSA] Remove IRQF_DISABLED for shared PCI irqs
Fix IRQ flags for PCI devices. The shared IRQs for PCI devices shouldn't be allocated with IRQF_DISABLED. Also, when MSI is enabled, IRQF_SHARED shouldn't be used. The patch removes unnecessary cast in request_irq and free_irq, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/emu10k1')
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c5
-rw-r--r--sound/pci/emu10k1/emu10k1x.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 8bc4ffa6220d..972ec40d8166 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -759,7 +759,7 @@ static int snd_emu10k1_free(struct snd_emu10k1 *emu)
759 free_pm_buffer(emu); 759 free_pm_buffer(emu);
760#endif 760#endif
761 if (emu->irq >= 0) 761 if (emu->irq >= 0)
762 free_irq(emu->irq, (void *)emu); 762 free_irq(emu->irq, emu);
763 if (emu->port) 763 if (emu->port)
764 pci_release_regions(emu->pci); 764 pci_release_regions(emu->pci);
765 if (emu->card_capabilities->ca0151_chip) /* P16V */ 765 if (emu->card_capabilities->ca0151_chip) /* P16V */
@@ -1246,7 +1246,8 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
1246 } 1246 }
1247 emu->port = pci_resource_start(pci, 0); 1247 emu->port = pci_resource_start(pci, 0);
1248 1248
1249 if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_DISABLED|IRQF_SHARED, "EMU10K1", (void *)emu)) { 1249 if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_SHARED,
1250 "EMU10K1", emu)) {
1250 err = -EBUSY; 1251 err = -EBUSY;
1251 goto error; 1252 goto error;
1252 } 1253 }
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index e0724394ed25..2199b42a6019 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -760,7 +760,7 @@ static int snd_emu10k1x_free(struct emu10k1x *chip)
760 760
761 // release the irq 761 // release the irq
762 if (chip->irq >= 0) 762 if (chip->irq >= 0)
763 free_irq(chip->irq, (void *)chip); 763 free_irq(chip->irq, chip);
764 764
765 // release the DMA 765 // release the DMA
766 if (chip->dma_buffer.area) { 766 if (chip->dma_buffer.area) {
@@ -927,8 +927,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
927 } 927 }
928 928
929 if (request_irq(pci->irq, snd_emu10k1x_interrupt, 929 if (request_irq(pci->irq, snd_emu10k1x_interrupt,
930 IRQF_DISABLED|IRQF_SHARED, "EMU10K1X", 930 IRQF_SHARED, "EMU10K1X", chip)) {
931 (void *)chip)) {
932 snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); 931 snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq);
933 snd_emu10k1x_free(chip); 932 snd_emu10k1x_free(chip);
934 return -EBUSY; 933 return -EBUSY;