aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-08-01 06:48:12 -0400
committerTakashi Iwai <tiwai@suse.de>2009-08-03 02:26:55 -0400
commitc32649feb4573b31f0a2bfdf35cbe1351256c764 (patch)
tree5e5cdcca68be562481daf2db3eaf74cc0f029ab2 /sound
parentcdb1fbf23181c133fb24f12ad14ccea7dc399599 (diff)
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 b6e6314d0069..df6d9820efad 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)
588 unsigned int addr = azx_command_addr(val); 588 unsigned int addr = azx_command_addr(val);
589 unsigned int wp; 589 unsigned int wp;
590 590
591 spin_lock_irq(&chip->reg_lock);
592
591 /* add command to corb */ 593 /* add command to corb */
592 wp = azx_readb(chip, CORBWP); 594 wp = azx_readb(chip, CORBWP);
593 wp++; 595 wp++;
594 wp %= ICH6_MAX_CORB_ENTRIES; 596 wp %= ICH6_MAX_CORB_ENTRIES;
595 597
596 spin_lock_irq(&chip->reg_lock);
597 chip->rirb.cmds[addr]++; 598 chip->rirb.cmds[addr]++;
598 chip->corb.buf[wp] = cpu_to_le32(val); 599 chip->corb.buf[wp] = cpu_to_le32(val);
599 azx_writel(chip, CORBWP, wp); 600 azx_writel(chip, CORBWP, wp);
601
600 spin_unlock_irq(&chip->reg_lock); 602 spin_unlock_irq(&chip->reg_lock);
601 603
602 return 0; 604 return 0;