提交 610e1ae9 编写于 作者: A Andy Shevchenko 提交者: Takashi Iwai

ALSA: fm801: Initialize chip after IRQ handler is registered

The commit b56fa687 ("ALSA: fm801: detect FM-only card earlier")
rearranged initialization calls, i.e. it makes snd_fm801_chip_init() to
be called before we register interrupt handler and set PCI bus
mastering.

Somehow it prevents FM801-AU to work properly. Thus, partially revert
initialization order changed by commit mentioned above.

Fixes: b56fa687 ("ALSA: fm801: detect FM-only card earlier")
Reported-by: NÉmeric MASCHINO <emeric.maschino@gmail.com>
Tested-by: NÉmeric MASCHINO <emeric.maschino@gmail.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: <stable@vger.kernel.org> # v4.5+
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 89542936
......@@ -1235,8 +1235,6 @@ static int snd_fm801_create(struct snd_card *card,
}
}
snd_fm801_chip_init(chip);
if ((chip->tea575x_tuner & TUNER_ONLY) == 0) {
if (devm_request_irq(&pci->dev, pci->irq, snd_fm801_interrupt,
IRQF_SHARED, KBUILD_MODNAME, chip)) {
......@@ -1248,6 +1246,8 @@ static int snd_fm801_create(struct snd_card *card,
pci_set_master(pci);
}
snd_fm801_chip_init(chip);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
snd_fm801_free(chip);
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册