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

Commit 26b01ccd authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Don't call DAI registration for CODECs with no DAI



Otherwise we generate worrying (but benign) warnings for amps.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 27ef3744
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -3122,10 +3122,12 @@ int snd_soc_register_codec(struct device *dev,
		fixup_codec_formats(&dai_drv[i].capture);
	}

	/* register DAIs */
	/* register any DAIs */
	if (num_dai) {
		ret = snd_soc_register_dais(dev, dai_drv, num_dai);
		if (ret < 0)
			goto error;
	}

	mutex_lock(&client_mutex);
	list_add(&codec->list, &codec_list);
@@ -3164,6 +3166,7 @@ void snd_soc_unregister_codec(struct device *dev)
	return;

found:
	if (codec->num_dai)
		for (i = 0; i < codec->num_dai; i++)
			snd_soc_unregister_dai(dev);