projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdb1fbf
)
ALSA: hda: read CORBWP inside reg_lock
author
Wu Fengguang
<
[email protected]
>
Sat, 1 Aug 2009 10:48:12 +0000
(18:48 +0800)
committer
Takashi Iwai
<
[email protected]
>
Mon, 3 Aug 2009 06:26:55 +0000
(08:26 +0200)
This converts the last CORBWP access outside of reg_lock.
Signed-off-by: Wu Fengguang <
[email protected]
>
Signed-off-by: Takashi Iwai <
[email protected]
>
sound/pci/hda/hda_intel.c
patch
|
blob
|
history
diff --git
a/sound/pci/hda/hda_intel.c
b/sound/pci/hda/hda_intel.c
index b6e6314d006954c096541632999c90f35a34bcc6..df6d9820efad9cc54e1c2051ba8b59e7d5b81fb7 100644
(file)
--- a/
sound/pci/hda/hda_intel.c
+++ b/
sound/pci/hda/hda_intel.c
@@
-588,15
+588,17
@@
static int azx_corb_send_cmd(struct hda_bus *bus, u32 val)
unsigned int addr = azx_command_addr(val);
unsigned int wp;
+ spin_lock_irq(&chip->reg_lock);
+
/* add command to corb */
wp = azx_readb(chip, CORBWP);
wp++;
wp %= ICH6_MAX_CORB_ENTRIES;
- spin_lock_irq(&chip->reg_lock);
chip->rirb.cmds[addr]++;
chip->corb.buf[wp] = cpu_to_le32(val);
azx_writel(chip, CORBWP, wp);
+
spin_unlock_irq(&chip->reg_lock);
return 0;