summaryrefslogtreecommitdiff
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-12 14:07:49 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-01 11:28:23 +0100
commit2667b4b8bef8598917adb1b4af46ed2b7d4fa0d7 (patch)
tree2a48749a51f1bcac242d2b3a5af1445de93089b5 /include/sound/soc.h
parentecd1732f0118f3bc47429ceffa01593ec16c364d (diff)
ASoC: jack: Push locking for jacks down to the jack
Currently operations on jack reporting take the CODEC mutex both to protect the current jack status and also to protect the DAPM run which is triggered on status updates. Since the addition of a DAPM-specific lock we no longer need to worry about locking DAPM as it has its own finer grained lock so create a per jack lock to take care of the jack status. This is both cleaner where the jack isn't specifically associated with a CODEC and clearer as it's much more obvious what the lock is protecting. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 098998743969..b8163ddf94d2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -518,6 +518,7 @@ struct snd_soc_jack_gpio {
#endif
struct snd_soc_jack {
+ struct mutex mutex;
struct snd_jack *jack;
struct snd_soc_codec *codec;
struct list_head pins;