Commit 9b87a5b0 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: pxa: Remove superfluous locking

The locking here was added in commit 71a29560 ("ASoC: Lock the CODEC in PXA
external jack controls") to protect the DAPM changes that are made inside of
${board}_ext_control() against concurrent updates. The ASoC core was updated in
commit a73fb2df ("ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec
mutex") to use a card wide lock rather the CODEC mutex to protect DAPM
operations. We now have proper locking inside ${board}_ext_control() itself, so
taking the CODEC lock can be removed.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
...@@ -99,13 +99,9 @@ static int corgi_startup(struct snd_pcm_substream *substream) ...@@ -99,13 +99,9 @@ static int corgi_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
corgi_ext_control(&codec->dapm); corgi_ext_control(&codec->dapm);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -73,13 +73,9 @@ static int magician_startup(struct snd_pcm_substream *substream) ...@@ -73,13 +73,9 @@ static int magician_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
magician_ext_control(codec); magician_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -76,13 +76,9 @@ static int poodle_startup(struct snd_pcm_substream *substream) ...@@ -76,13 +76,9 @@ static int poodle_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
poodle_ext_control(&codec->dapm); poodle_ext_control(&codec->dapm);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -108,13 +108,9 @@ static int spitz_startup(struct snd_pcm_substream *substream) ...@@ -108,13 +108,9 @@ static int spitz_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
spitz_ext_control(&codec->dapm); spitz_ext_control(&codec->dapm);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
...@@ -80,13 +80,9 @@ static int tosa_startup(struct snd_pcm_substream *substream) ...@@ -80,13 +80,9 @@ static int tosa_startup(struct snd_pcm_substream *substream)
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
mutex_lock(&codec->mutex);
/* check the jack status at stream startup */ /* check the jack status at stream startup */
tosa_ext_control(codec); tosa_ext_control(codec);
mutex_unlock(&codec->mutex);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment