diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2019-05-23 13:12:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-24 08:10:46 -0400 |
commit | 34ac3c3eb8f0c07252ceddf0a22dd240e5c91ccb (patch) | |
tree | f850e4fb8ecf9fd7652c67c1ac06eacf567c98b9 /sound | |
parent | 4819d06292c9b57eabdd6d1603e49a27baf183be (diff) |
ASoC: core: lock client_mutex while removing link components
Removing link components results in topology unloading. So,
acquire the client_mutex before removing components in
soc_remove_link_components. This will prevent the lockdep warning
seen when dai links are removed during topology removal.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 2403bec2fccf..7c9415987ac7 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1005,12 +1005,14 @@ static void soc_remove_link_components(struct snd_soc_card *card, | |||
1005 | struct snd_soc_component *component; | 1005 | struct snd_soc_component *component; |
1006 | struct snd_soc_rtdcom_list *rtdcom; | 1006 | struct snd_soc_rtdcom_list *rtdcom; |
1007 | 1007 | ||
1008 | mutex_lock(&client_mutex); | ||
1008 | for_each_rtdcom(rtd, rtdcom) { | 1009 | for_each_rtdcom(rtd, rtdcom) { |
1009 | component = rtdcom->component; | 1010 | component = rtdcom->component; |
1010 | 1011 | ||
1011 | if (component->driver->remove_order == order) | 1012 | if (component->driver->remove_order == order) |
1012 | soc_remove_component(component); | 1013 | soc_remove_component(component); |
1013 | } | 1014 | } |
1015 | mutex_unlock(&client_mutex); | ||
1014 | } | 1016 | } |
1015 | 1017 | ||
1016 | static void soc_remove_dai_links(struct snd_soc_card *card) | 1018 | static void soc_remove_dai_links(struct snd_soc_card *card) |