提交 ee8829dc 编写于 作者: B Bard Liao 提交者: Takashi Iwai

ALSA: hda: fix: lock reg_lock before calling snd_hdac_bus_update_rirb

The patch is to fix commit 5e13cf6c
(ALSA: hda: add polling mode in snd_hdac_bus_get_response)
spin_lock_irq should be called before snd_hdac_bus_update_rirb.

Fixes: 5e13cf6c ("ALSA: hda: add polling mode in snd_hdac_bus_get_response")
Signed-off-by: NBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 64ca9d9f
......@@ -239,9 +239,9 @@ int snd_hdac_bus_get_response(struct hdac_bus *bus, unsigned int addr,
timeout = jiffies + msecs_to_jiffies(1000);
for (loopcounter = 0;; loopcounter++) {
spin_lock_irq(&bus->reg_lock);
if (bus->polling_mode)
snd_hdac_bus_update_rirb(bus);
spin_lock_irq(&bus->reg_lock);
if (!bus->rirb.cmds[addr]) {
if (res)
*res = bus->rirb.res[addr]; /* the last value */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册