diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-06 18:58:22 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-04-01 06:28:23 -0400 |
commit | e06ab3b8e82c89a8ada25f61fbd9f02d6ca3103f (patch) | |
tree | 0672b6f7dc47588417293edf120744eb3a1bb615 /sound/soc/soc-dapm.c | |
parent | 49575fb52bf76bf48e2d29ff034e8dad8d7ba638 (diff) |
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>
Diffstat (limited to 'sound/soc/soc-dapm.c')
-rw-r--r-- | sound/soc/soc-dapm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 1e449f375d98..dd603fa38097 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) | |||
208 | 208 | ||
209 | static inline void soc_widget_lock(struct snd_soc_dapm_widget *w) | 209 | static inline void soc_widget_lock(struct snd_soc_dapm_widget *w) |
210 | { | 210 | { |
211 | if (w->codec) | 211 | if (w->codec && !w->codec->using_regmap) |
212 | mutex_lock(&w->codec->mutex); | 212 | mutex_lock(&w->codec->mutex); |
213 | else if (w->platform) | 213 | else if (w->platform) |
214 | mutex_lock(&w->platform->mutex); | 214 | mutex_lock(&w->platform->mutex); |
@@ -216,7 +216,7 @@ static inline void soc_widget_lock(struct snd_soc_dapm_widget *w) | |||
216 | 216 | ||
217 | static inline void soc_widget_unlock(struct snd_soc_dapm_widget *w) | 217 | static inline void soc_widget_unlock(struct snd_soc_dapm_widget *w) |
218 | { | 218 | { |
219 | if (w->codec) | 219 | if (w->codec && !w->codec->using_regmap) |
220 | mutex_unlock(&w->codec->mutex); | 220 | mutex_unlock(&w->codec->mutex); |
221 | else if (w->platform) | 221 | else if (w->platform) |
222 | mutex_unlock(&w->platform->mutex); | 222 | mutex_unlock(&w->platform->mutex); |