]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: core - Improve card registration error messaging for large DAI links.
authorLiam Girdwood <lrg@ti.com>
Mon, 9 Jan 2012 12:09:29 +0000 (12:09 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 20 Jan 2012 13:58:26 +0000 (13:58 +0000)
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.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c

index b5ecf6d2321446198551c6d2cc6d7728c81be07a..41c8e45a23e2ec0b143e581b758e15aaefc11537 100644 (file)
@@ -2864,7 +2864,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;
                }
 
@@ -2874,7 +2875,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;
                }
 
@@ -2884,7 +2885,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;
                }
        }