summaryrefslogtreecommitdiffstats
path: root/sound/pci/aw2
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-06-23 11:54:05 +0200
committerTakashi Iwai <tiwai@suse.de>2008-06-23 12:06:23 +0200
commit44e051773da465f8c92127914bc784770e0e2a28 (patch)
treed984ee6d1e75bbf85b98745c2160dab9afc12aaf /sound/pci/aw2
parent481c5346d0981940ee63037eb53e4e37b0735c10 (diff)
downloadlinux-44e051773da465f8c92127914bc784770e0e2a28.tar.bz2
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/aw2')
-rw-r--r--sound/pci/aw2/aw2-alsa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 56f87cd33c19..3f00ddf450f8 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -316,6 +316,8 @@ static int __devinit snd_aw2_create(struct snd_card *card,
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,
IRQF_SHARED, "Audiowerk2", chip)) {
@@ -329,8 +331,6 @@ static int __devinit snd_aw2_create(struct snd_card *card,
}
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);
if (err < 0) {
free_irq(chip->irq, (void *)chip);