mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 23:23:55 +08:00
ASoC: soc-core: Hold client_mutex around soc_init_dai_link()
soc_init_dai_link() calls soc_find_component() which needs
to be within client_mutex lock. Add client_mutex lock around
soc_init_dai_link() in snd_soc_register_card() to avoid
lockdep warning.
Fixes: 8780cf1142
("ASoC: soc-core: defer card probe until all component is added to list")
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Rohit kumar <rohitkr@codeaurora.org>
Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
239b8b34a8
commit
04eb1efcd6
@ -1027,6 +1027,7 @@ static int snd_soc_init_platform(struct snd_soc_card *card,
|
|||||||
struct snd_soc_dai_link *dai_link)
|
struct snd_soc_dai_link *dai_link)
|
||||||
{
|
{
|
||||||
struct snd_soc_dai_link_component *platform = dai_link->platform;
|
struct snd_soc_dai_link_component *platform = dai_link->platform;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME
|
* FIXME
|
||||||
*
|
*
|
||||||
@ -2754,15 +2755,18 @@ int snd_soc_register_card(struct snd_soc_card *card)
|
|||||||
if (!card->name || !card->dev)
|
if (!card->name || !card->dev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
mutex_lock(&client_mutex);
|
||||||
for_each_card_prelinks(card, i, link) {
|
for_each_card_prelinks(card, i, link) {
|
||||||
|
|
||||||
ret = soc_init_dai_link(card, link);
|
ret = soc_init_dai_link(card, link);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(card->dev, "ASoC: failed to init link %s\n",
|
dev_err(card->dev, "ASoC: failed to init link %s\n",
|
||||||
link->name);
|
link->name);
|
||||||
|
mutex_unlock(&client_mutex);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mutex_unlock(&client_mutex);
|
||||||
|
|
||||||
dev_set_drvdata(card->dev, card);
|
dev_set_drvdata(card->dev, card);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user