summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown2019-06-26 13:39:34 +0200
committerMark Brown2019-06-26 13:39:34 +0200
commit53c8b29abe42e5601cfa0ea5962532f0cfdec8a0 (patch)
treecad53f42ce7a03c39a984bcdbcc42cd47f1af6f9 /sound/soc/soc-core.c
parentASoC: soc-core: don't use soc_find_component() at snd_soc_find_dai() (diff)
parentLinux 5.2-rc6 (diff)
downloadkernel-qcow2-linux-53c8b29abe42e5601cfa0ea5962532f0cfdec8a0.tar.gz
kernel-qcow2-linux-53c8b29abe42e5601cfa0ea5962532f0cfdec8a0.tar.xz
kernel-qcow2-linux-53c8b29abe42e5601cfa0ea5962532f0cfdec8a0.zip
Merge tag 'v5.2-rc6' into asoc-5.3
Linux 5.2-rc6
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 8ccaf63e428c..05cd710273b6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1021,14 +1021,12 @@ static void soc_remove_link_components(struct snd_soc_card *card,
struct snd_soc_component *component;
struct snd_soc_rtdcom_list *rtdcom;
- mutex_lock(&client_mutex);
for_each_rtdcom(rtd, rtdcom) {
component = rtdcom->component;
if (component->driver->remove_order == order)
soc_remove_component(component);
}
- mutex_unlock(&client_mutex);
}
static void soc_remove_dai_links(struct snd_soc_card *card)
@@ -2750,12 +2748,14 @@ static void snd_soc_unbind_card(struct snd_soc_card *card, bool unregister)
snd_soc_dapm_shutdown(card);
snd_soc_flush_all_delayed_work(card);
+ mutex_lock(&client_mutex);
/* remove all components used by DAI links on this card */
for_each_comp_order(order) {
for_each_card_rtds(card, rtd) {
soc_remove_link_components(card, rtd, order);
}
}
+ mutex_unlock(&client_mutex);
soc_cleanup_card_resources(card);
if (!unregister)