Skip to contentSkip to conversation

ASoC: core - Improve card registration error messaging for large DAI links.

PATCH Applied Liam Girdwood 2 participants 2 messages Jan 9, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: core - Improve card registration error messaging for large DAI links.

Print out the offending DAI link entry when a naming error occurs. Makes thing easier to debug for machines with a large number of DAI links.

---
 sound/soc/soc-core.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
sound/soc/soc-core.c +5 -3
index acbb960..e1d8433 100644
@@ -2854,7 +2854,8 @@ int snd_soc_register_card(struct snd_soc_card *card)
 		 */
 		if (!!link->codec_name == !!link->codec_of_node) {
 			dev_err(card->dev,
-				"Neither/both codec name/of_node are set\n");
+				"Neither/both codec name/of_node are set for %s\n",
+				link->name);
 			return -EINVAL;
 		}
 
@@ -2864,7 +2865,7 @@ int snd_soc_register_card(struct snd_soc_card *card)
 		 */
 		if (link->platform_name && link->platform_of_node) {
 			dev_err(card->dev,
-				"Both platform name/of_node are set\n");
+				"Both platform name/of_node are set for %s\n", link->name);
 			return -EINVAL;
 		}
 
@@ -2874,7 +2875,8 @@ int snd_soc_register_card(struct snd_soc_card *card)
 		 */
 		if (!!link->cpu_dai_name == !!link->cpu_dai_of_node) {
 			dev_err(card->dev,
-				"Neither/both cpu_dai name/of_node are set\n");
+				"Neither/both cpu_dai name/of_node are set for %s\n",
+				link->name);
 			return -EINVAL;
 		}
 	}
Signature · 1 line
1.7.5.4
Applied
#1 lore raw
Quoted 2 lines · Liam Girdwood

Print out the offending DAI link entry when a naming error occurs. Makes thing easier to debug for machines with a large number of DAI links.

Applied, thanks.