diff options
author | Stuart Henderson <stuarth@opensource.cirrus.com> | 2017-09-21 06:02:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-09-25 12:34:56 -0400 |
commit | f19c181f20cdfb2aa5f4a1bba095a008e34ed61b (patch) | |
tree | 7d8edbc4939a1dceae5ed023da521fd25a914439 | |
parent | 38b8e6f092fd71eee56a064487be335226b0a54d (diff) |
ASoC: dapm: Make snd_soc_dapm_add/del_routes use runtime mutex subclass
Make snd_soc_dapm_add_routes and snd_soc_dapm_del_routes use the
SND_SOC_DAPM_CLASS_RUNTIME dapm subclass to allow dynamic dapm route
updates.
Signed-off-by: Stuart Henderson <stuarth@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/soc-dapm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index d55cac655195..ba78a88d2af0 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c | |||
@@ -2884,7 +2884,7 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm, | |||
2884 | { | 2884 | { |
2885 | int i, r, ret = 0; | 2885 | int i, r, ret = 0; |
2886 | 2886 | ||
2887 | mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); | 2887 | mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2888 | for (i = 0; i < num; i++) { | 2888 | for (i = 0; i < num; i++) { |
2889 | r = snd_soc_dapm_add_route(dapm, route); | 2889 | r = snd_soc_dapm_add_route(dapm, route); |
2890 | if (r < 0) { | 2890 | if (r < 0) { |
@@ -2915,7 +2915,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm, | |||
2915 | { | 2915 | { |
2916 | int i; | 2916 | int i; |
2917 | 2917 | ||
2918 | mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT); | 2918 | mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME); |
2919 | for (i = 0; i < num; i++) { | 2919 | for (i = 0; i < num; i++) { |
2920 | snd_soc_dapm_del_route(dapm, route); | 2920 | snd_soc_dapm_del_route(dapm, route); |
2921 | route++; | 2921 | route++; |