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

[PATCH] fix ALSA PCI compile problems

parent ba877295
......@@ -1968,7 +1968,7 @@ static void snd_ali_resume(struct pci_dev *dev)
static int snd_ali_free(ali_t * codec)
{
snd_ali_disable_address_interrupt(codec);
synchronize_irq();
synchronize_irq(codec->irq);
if (codec->irq >=0)
free_irq(codec->irq, (void *)codec);
if (codec->res_port) {
......@@ -2116,7 +2116,7 @@ static int __devinit snd_ali_create(snd_card_t * card,
return -EBUSY;
}
synchronize_irq();
synchronize_irq(pci->irq);
codec->synth.chmap = 0;
codec->synth.chcnt = 0;
......
......@@ -2479,7 +2479,7 @@ static int snd_cmipci_free(cmipci_t *cm)
/* reset mixer */
snd_cmipci_mixer_write(cm, 0, 0);
synchronize_irq();
synchronize_irq(cm->irq);
free_irq(cm->irq, (void *)cm);
}
......
......@@ -1300,7 +1300,8 @@ static int snd_cs4281_free(cs4281_t *chip)
}
#endif
snd_cs4281_proc_done(chip);
synchronize_irq();
if(chip->irq >= 0)
synchronize_irq(chip->irq);
/* Mask interrupts */
snd_cs4281_pokeBA0(chip, BA0_HIMR, 0x7fffffff);
......@@ -1603,7 +1604,7 @@ static int __devinit snd_cs4281_create(snd_card_t * card,
BA0_HISR_DMA(1) |
BA0_HISR_DMA(2) |
BA0_HISR_DMA(3)));
synchronize_irq();
synchronize_irq(chip->irq);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
snd_cs4281_free(chip);
......
......@@ -2310,7 +2310,8 @@ static int snd_m3_free(m3_t *chip)
vfree(chip->suspend_mem);
#endif
synchronize_irq();
if(chip->irq >= 0)
synchronize_irq(chip->irq);
if (chip->iobase_res) {
release_resource(chip->iobase_res);
......
......@@ -1346,7 +1346,8 @@ static int snd_nm256_free(nm256_t *chip)
if (chip->streams[SNDRV_PCM_STREAM_CAPTURE].running)
snd_nm256_capture_stop(chip);
synchronize_irq();
if(chip->irq >= 0)
synchronize_irq(chip->irq);
if (chip->cport)
iounmap((void *) chip->cport);
......
......@@ -993,7 +993,8 @@ static int snd_via686a_free(via686a_t *chip)
snd_via686a_channel_reset(chip, &chip->playback_fm);
/* --- */
__end_hw:
synchronize_irq();
if(chip->irq >= 0)
synchronize_irq(chip->irq);
if (chip->tables)
snd_free_pci_pages(chip->pci, 3 * sizeof(unsigned int) * VIA_MAX_FRAGS * 2, chip->tables, chip->tables_addr);
if (chip->res_port) {
......@@ -1055,7 +1056,7 @@ static int __devinit snd_via686a_create(snd_card_t * card,
if (ac97_clock >= 8000 && ac97_clock <= 48000)
chip->ac97_clock = ac97_clock;
pci_read_config_byte(pci, PCI_REVISION_ID, &chip->revision);
synchronize_irq();
synchronize_irq(pci->irq);
/* initialize offsets */
chip->playback.reg_offset = VIA_REG_PLAYBACK_STATUS;
......
......@@ -759,7 +759,8 @@ static int snd_via8233_free(via8233_t *chip)
snd_via8233_channel_reset(chip, &chip->capture);
/* --- */
__end_hw:
synchronize_irq();
if (chip->irq)
synchronize_irq(chip->irq);
if (chip->tables)
snd_free_pci_pages(chip->pci,
VIA_NUM_OF_DMA_CHANNELS * sizeof(unsigned int) * VIA_MAX_FRAGS * 2,
......@@ -817,7 +818,7 @@ static int __devinit snd_via8233_create(snd_card_t * card,
if (ac97_clock >= 8000 && ac97_clock <= 48000)
chip->ac97_clock = ac97_clock;
pci_read_config_byte(pci, PCI_REVISION_ID, &chip->revision);
synchronize_irq();
synchronize_irq(chip->irq);
/* initialize offsets */
#if 0
......
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