summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-08-01 18:48:12 +0800
committerTakashi Iwai <tiwai@suse.de>2009-08-03 08:26:55 +0200
commitc32649feb4573b31f0a2bfdf35cbe1351256c764 (patch)
tree5e5cdcca68be562481daf2db3eaf74cc0f029ab2 /sound
parentcdb1fbf23181c133fb24f12ad14ccea7dc399599 (diff)
downloadop-kernel-dev-c32649feb4573b31f0a2bfdf35cbe1351256c764.zip
op-kernel-dev-c32649feb4573b31f0a2bfdf35cbe1351256c764.tar.gz
ALSA: hda: read CORBWP inside reg_lock
This converts the last CORBWP access outside of reg_lock. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_intel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index b6e6314..df6d982 100644
--- 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;
OpenPOWER on IntegriCloud