Commit 6d5701b2 authored by Mark Brown's avatar Mark Brown

ASoC: Instantiate any forgotten DAPM widgets

With the recent changes to the DAPM power checks it has become important
to explicitly instantiate all widgets but some drivers were forgetting
to do that.  Since everything needs to do it add a call to instantiate
them immediately before the card registration - it does no harm when it
is called repeatedly and saves work in drivers.
Tested-by: default avatarpHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5ba73683
...@@ -1389,6 +1389,9 @@ int snd_soc_init_card(struct snd_soc_device *socdev) ...@@ -1389,6 +1389,9 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
snprintf(codec->card->longname, sizeof(codec->card->longname), snprintf(codec->card->longname, sizeof(codec->card->longname),
"%s (%s)", card->name, codec->name); "%s (%s)", card->name, codec->name);
/* Make sure all DAPM widgets are instantiated */
snd_soc_dapm_new_widgets(codec);
ret = snd_card_register(codec->card); ret = snd_card_register(codec->card);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR "asoc: failed to register soundcard for %s\n", printk(KERN_ERR "asoc: failed to register soundcard for %s\n",
......
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