aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc-dapm.h
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2014-02-18 10:22:14 -0500
committerMark Brown <broonie@linaro.org>2014-02-20 04:40:07 -0500
commit113911006442a36c2b4669faf1699d9042ef80ab (patch)
treed93a53b643d0293bff11ffaceb35174524474b05 /include/sound/soc-dapm.h
parentc4204960e9d0ba99459dbf1db918f99a45e7a62a (diff)
ASoC: dapm: Add locking to snd_soc_dapm_xxxx_pin functions
The snd_soc_dapm_xxxx_pin all require the dapm_mutex to be held when they are called as they edit the dirty list, however very few of the callers do so. This patch adds unlocked versions of all the functions replacing the existing implementations with one that holds the lock internally. We also fix up the places where the lock was actually held on the caller side. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'include/sound/soc-dapm.h')
-rw-r--r--include/sound/soc-dapm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index 68d92e36facd..6e89ef6c11c1 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -449,14 +449,22 @@ void snd_soc_dapm_debugfs_init(struct snd_soc_dapm_context *dapm,
449/* dapm audio pin control and status */ 449/* dapm audio pin control and status */
450int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm, 450int snd_soc_dapm_enable_pin(struct snd_soc_dapm_context *dapm,
451 const char *pin); 451 const char *pin);
452int snd_soc_dapm_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
453 const char *pin);
452int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm, 454int snd_soc_dapm_disable_pin(struct snd_soc_dapm_context *dapm,
453 const char *pin); 455 const char *pin);
456int snd_soc_dapm_disable_pin_unlocked(struct snd_soc_dapm_context *dapm,
457 const char *pin);
454int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin); 458int snd_soc_dapm_nc_pin(struct snd_soc_dapm_context *dapm, const char *pin);
459int snd_soc_dapm_nc_pin_unlocked(struct snd_soc_dapm_context *dapm,
460 const char *pin);
455int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm, 461int snd_soc_dapm_get_pin_status(struct snd_soc_dapm_context *dapm,
456 const char *pin); 462 const char *pin);
457int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm); 463int snd_soc_dapm_sync(struct snd_soc_dapm_context *dapm);
458int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm, 464int snd_soc_dapm_force_enable_pin(struct snd_soc_dapm_context *dapm,
459 const char *pin); 465 const char *pin);
466int snd_soc_dapm_force_enable_pin_unlocked(struct snd_soc_dapm_context *dapm,
467 const char *pin);
460int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm, 468int snd_soc_dapm_ignore_suspend(struct snd_soc_dapm_context *dapm,
461 const char *pin); 469 const char *pin);
462void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec); 470void snd_soc_dapm_auto_nc_codec_pins(struct snd_soc_codec *codec);