diff options
| author | Eero Nurkkala <ext-eero.nurkkala@nokia.com> | 2009-10-12 01:41:59 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-10-13 08:33:02 -0400 |
| commit | 8e8b2d676f3f7c1246b108793fb5690e6c6fcd26 (patch) | |
| tree | 12953d54da24f6a92a143303258987e51ac8878b | |
| parent | 6f775ba0154cdf10108071acc71f26c4efdb8d57 (diff) | |
ASoC: Serialize access to dapm_power_widgets()
Access to damp_power_widgets() is assumed to be single-threaded.
Concurrent accesses to dapm_power_widgets() may result in
unpredictable behavior.
Calls from:
close_delayed_work()
soc_codec_close()
soc_pcm_prepare()
soc_suspend()
soc_resume_deferred()
to snd_soc_dapm_stream_event() do not have the codec->mutex
taken to cover the call to dapm_power_widgets(). Thus, take
the mutex in these paths also to assure single-threaded use
of dapm_power_widgets().
Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| -rw-r--r-- | sound/soc/soc-dapm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 8de6f9dec4a2..d89f6dc00908 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
| @@ -2072,9 +2072,9 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec *codec, | |||
| 2072 | } | 2072 | } |
| 2073 | } | 2073 | } |
| 2074 | } | 2074 | } |
| 2075 | mutex_unlock(&codec->mutex); | ||
| 2076 | 2075 | ||
| 2077 | dapm_power_widgets(codec, event); | 2076 | dapm_power_widgets(codec, event); |
| 2077 | mutex_unlock(&codec->mutex); | ||
| 2078 | dump_dapm(codec, __func__); | 2078 | dump_dapm(codec, __func__); |
| 2079 | return 0; | 2079 | return 0; |
| 2080 | } | 2080 | } |
