From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH] ASoC: dapm: Only lock CODEC for I/O if not using regmap
Date: Wed, 7 Mar 2012 00:03:15 +0000 [thread overview]
Message-ID: <1331078595-6210-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
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>
---
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 6f4ea12b..25a395e 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);
--
1.7.9.1
next reply other threads:[~2012-03-07 0:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-07 0:03 Mark Brown [this message]
2012-03-07 11:47 ` [PATCH] ASoC: dapm: Only lock CODEC for I/O if not using regmap Liam Girdwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331078595-6210-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).