summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-06 23:58:22 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-07 11:53:00 +0000
commit66bf93212f19548f5ed221356b2d70189cc18254 (patch)
tree3b246730d2ebcc65e4b3e192cb62ef65ee2d9ef1
parent96acc357bedad69fbc94d1b923a960af5a411c6f (diff)
downloadblackbird-op-linux-66bf93212f19548f5ed221356b2d70189cc18254.tar.gz
blackbird-op-linux-66bf93212f19548f5ed221356b2d70189cc18254.zip
ASoC: dapm: Only lock CODEC for I/O if not using regmap
If we do use regmap then regmap will take care of things for us. We actually already have this check at a higher level for the current users but this makes sure we do the right thing in the future too if we need to. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
-rw-r--r--sound/soc/soc-dapm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index a837977f0ac7..1ba2a711b54c 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -208,7 +208,7 @@ static int soc_widget_write(struct snd_soc_dapm_widget *w, int reg, int val)
static inline void soc_widget_lock(struct snd_soc_dapm_widget *w)
{
- if (w->codec)
+ if (w->codec && !w->codec->using_regmap)
mutex_lock(&w->codec->mutex);
else if (w->platform)
mutex_lock(&w->platform->mutex);
@@ -216,7 +216,7 @@ static inline void soc_widget_lock(struct snd_soc_dapm_widget *w)
static inline void soc_widget_unlock(struct snd_soc_dapm_widget *w)
{
- if (w->codec)
+ if (w->codec && !w->codec->using_regmap)
mutex_unlock(&w->codec->mutex);
else if (w->platform)
mutex_unlock(&w->platform->mutex);
OpenPOWER on IntegriCloud