Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1005,12 +1005,14 @@ 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)