ASoC: dapm: Make snd_soc_dapm_add/del_routes use runtime mutex subclass
authorStuart Henderson <stuarth@opensource.cirrus.com>
Thu, 21 Sep 2017 10:02:12 +0000 (11:02 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 25 Sep 2017 16:34:56 +0000 (17:34 +0100)
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>
sound/soc/soc-dapm.c

index d55cac65519542313e087646ae455f7f28a2db41..ba78a88d2af08270a827a8c4ef7252607b8a1a3c 100644 (file)
@@ -2884,7 +2884,7 @@ int snd_soc_dapm_add_routes(struct snd_soc_dapm_context *dapm,
 {
        int i, r, ret = 0;
 
-       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
+       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
        for (i = 0; i < num; i++) {
                r = snd_soc_dapm_add_route(dapm, route);
                if (r < 0) {
@@ -2915,7 +2915,7 @@ int snd_soc_dapm_del_routes(struct snd_soc_dapm_context *dapm,
 {
        int i;
 
-       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_INIT);
+       mutex_lock_nested(&dapm->card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
        for (i = 0; i < num; i++) {
                snd_soc_dapm_del_route(dapm, route);
                route++;