ASoC: soc-core: defer card registration if codec component is missing
Like cpus and platforms, defer sound card initialization if the codec component is missing when initializing the dai_link Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
8af6b2291e
commit
af18b13fed
@ -1071,12 +1071,20 @@ static int soc_init_dai_link(struct snd_soc_card *card,
|
|||||||
link->name);
|
link->name);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Codec DAI name must be specified */
|
/* Codec DAI name must be specified */
|
||||||
if (!codec->dai_name) {
|
if (!codec->dai_name) {
|
||||||
dev_err(card->dev, "ASoC: codec_dai_name not set for %s\n",
|
dev_err(card->dev, "ASoC: codec_dai_name not set for %s\n",
|
||||||
link->name);
|
link->name);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Defer card registration if codec component is not added to
|
||||||
|
* component list.
|
||||||
|
*/
|
||||||
|
if (!soc_find_component(codec))
|
||||||
|
return -EPROBE_DEFER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user