Commit 34ac3c3e authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown

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: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4819d062
...@@ -1005,12 +1005,14 @@ static void soc_remove_link_components(struct snd_soc_card *card, ...@@ -1005,12 +1005,14 @@ static void soc_remove_link_components(struct snd_soc_card *card,
struct snd_soc_component *component; struct snd_soc_component *component;
struct snd_soc_rtdcom_list *rtdcom; struct snd_soc_rtdcom_list *rtdcom;
mutex_lock(&client_mutex);
for_each_rtdcom(rtd, rtdcom) { for_each_rtdcom(rtd, rtdcom) {
component = rtdcom->component; component = rtdcom->component;
if (component->driver->remove_order == order) if (component->driver->remove_order == order)
soc_remove_component(component); soc_remove_component(component);
} }
mutex_unlock(&client_mutex);
} }
static void soc_remove_dai_links(struct snd_soc_card *card) static void soc_remove_dai_links(struct snd_soc_card *card)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment