提交 44e05177 编写于 作者: T Takashi Iwai

ALSA: aw2 - Fix Oops at initialization

The irq handler may be called before the proper initialization of hardware.
Call snd_aw2_saa7146_setup() before the irq handler registration.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 481c5346
...@@ -316,6 +316,8 @@ static int __devinit snd_aw2_create(struct snd_card *card, ...@@ -316,6 +316,8 @@ static int __devinit snd_aw2_create(struct snd_card *card,
return -ENOMEM; return -ENOMEM;
} }
/* (2) initialization of the chip hardware */
snd_aw2_saa7146_setup(&chip->saa7146, chip->iobase_virt);
if (request_irq(pci->irq, snd_aw2_saa7146_interrupt, if (request_irq(pci->irq, snd_aw2_saa7146_interrupt,
IRQF_SHARED, "Audiowerk2", chip)) { IRQF_SHARED, "Audiowerk2", chip)) {
...@@ -329,8 +331,6 @@ static int __devinit snd_aw2_create(struct snd_card *card, ...@@ -329,8 +331,6 @@ static int __devinit snd_aw2_create(struct snd_card *card,
} }
chip->irq = pci->irq; chip->irq = pci->irq;
/* (2) initialization of the chip hardware */
snd_aw2_saa7146_setup(&chip->saa7146, chip->iobase_virt);
err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
if (err < 0) { if (err < 0) {
free_irq(chip->irq, (void *)chip); free_irq(chip->irq, (void *)chip);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册