Skip to contentSkip to conversation

ASoC: pxa: Remove superfluous locking

PATCH Applied Lars-Peter Clausen 2 participants 2 messages Feb 22, 2014 – Feb 23, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: pxa: Remove superfluous locking

The locking here was added in commit 71a295602e ("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 a73fb2df01 ("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.

---
 sound/soc/pxa/corgi.c    | 4 ----
 sound/soc/pxa/magician.c | 4 ----
 sound/soc/pxa/poodle.c   | 4 ----
 sound/soc/pxa/spitz.c    | 4 ----
 sound/soc/pxa/tosa.c     | 4 ----
 5 files changed, 20 deletions(-)
sound/soc/pxa/corgi.c +0 -4
index 9d9c8ad..b4db3b9 100644
@@ -103,13 +103,9 @@ static int corgi_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	corgi_ext_control(&codec->dapm);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
sound/soc/pxa/magician.c +0 -4
index 31242be..41ab6678 100644
@@ -77,13 +77,9 @@ static int magician_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	magician_ext_control(codec);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
sound/soc/pxa/poodle.c +0 -4
index c93e138..27c6c03 100644
@@ -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_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	poodle_ext_control(&codec->dapm);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
sound/soc/pxa/spitz.c +0 -4
index 04dbb5a..a3a13c9 100644
@@ -113,13 +113,9 @@ static int spitz_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	spitz_ext_control(&codec->dapm);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
sound/soc/pxa/tosa.c +0 -4
index 2a4b438..cead165 100644
@@ -84,13 +84,9 @@ static int tosa_startup(struct snd_pcm_substream *substream)
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct snd_soc_codec *codec = rtd->codec;
 
-	mutex_lock(&codec->mutex);
-
 	/* check the jack status at stream startup */
 	tosa_ext_control(codec);
 
-	mutex_unlock(&codec->mutex);
-
 	return 0;
 }
 
Signature · 1 line
1.8.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Lars-Peter Clausen

The locking here was added in commit 71a295602e ("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

Applied, thanks.