ASoC: simple-card-utils: share same dev_dbg() for sysclk
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 5 Jun 2017 04:28:45 +0000 (04:28 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 6 Jun 2017 18:46:08 +0000 (19:46 +0100)
Let's share same debug message for sysclk

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/simple_card_utils.h
sound/soc/generic/audio-graph-card.c
sound/soc/generic/audio-graph-scu-card.c
sound/soc/generic/simple-card-utils.c
sound/soc/generic/simple-card.c
sound/soc/generic/simple-scu-card.c

index efab584af11b1625c35714b18ebedfbb8bf2295e..108cae459ed097c04c3e39a4b10882ccd6f3c190 100644 (file)
@@ -35,13 +35,16 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
                                     char *prefix);
 
 #define asoc_simple_card_parse_clk_cpu(dev, node, dai_link, simple_dai)                \
-       asoc_simple_card_parse_clk(dev, node, dai_link->cpu_of_node, simple_dai)
+       asoc_simple_card_parse_clk(dev, node, dai_link->cpu_of_node, simple_dai, \
+                                  dai_link->cpu_dai_name)
 #define asoc_simple_card_parse_clk_codec(dev, node, dai_link, simple_dai)      \
-       asoc_simple_card_parse_clk(dev, node, dai_link->codec_of_node, simple_dai)
+       asoc_simple_card_parse_clk(dev, node, dai_link->codec_of_node, simple_dai,\
+                                  dai_link->codec_dai_name)
 int asoc_simple_card_parse_clk(struct device *dev,
                               struct device_node *node,
                               struct device_node *dai_of_node,
-                              struct asoc_simple_dai *simple_dai);
+                              struct asoc_simple_dai *simple_dai,
+                              const char *name);
 
 #define asoc_simple_card_parse_cpu(node, dai_link,                             \
                                   list_name, cells_name, is_single_link)       \
index 2c3a1cc014428a05aaf6f76cbca8c92134c8824c..0180b286bee351858d76b0fbe44ac606f4ed6095 100644 (file)
@@ -169,13 +169,6 @@ static int asoc_graph_card_dai_link_of(struct device_node *cpu_port,
        dai_link->ops = &asoc_graph_card_ops;
        dai_link->init = asoc_graph_card_dai_init;
 
-       dev_dbg(dev, "\tcpu : %s / %d\n",
-               dai_link->cpu_dai_name,
-               cpu_dai->sysclk);
-       dev_dbg(dev, "\tcodec : %s / %d\n",
-               dai_link->codec_dai_name,
-               codec_dai->sysclk);
-
        asoc_simple_card_canonicalize_cpu(dai_link,
                                          card->num_links == 1);
 
index 1ce727b6bc21806ee0267008c0e2e60ec7240bc0..0066102f5bc45809b07691d6075143f007ed2dcd 100644 (file)
@@ -185,11 +185,6 @@ static int asoc_graph_card_dai_link_of(struct device_node *ep,
        dai_link->ops                   = &asoc_graph_card_ops;
        dai_link->init                  = asoc_graph_card_dai_init;
 
-       dev_dbg(dev, "\t%s / %04x / %d\n",
-               dai_link->name,
-               dai_link->dai_fmt,
-               dai_props->sysclk);
-
        return 0;
 }
 
index 1f08064f65b18345fcea7f44e8526062506e0ca9..d9d8b8a58348e27304a05763e42c12d168134c0a 100644 (file)
@@ -113,7 +113,8 @@ EXPORT_SYMBOL_GPL(asoc_simple_card_parse_card_name);
 int asoc_simple_card_parse_clk(struct device *dev,
                               struct device_node *node,
                               struct device_node *dai_of_node,
-                              struct asoc_simple_dai *simple_dai)
+                              struct asoc_simple_dai *simple_dai,
+                              const char *name)
 {
        struct clk *clk;
        u32 val;
@@ -136,6 +137,8 @@ int asoc_simple_card_parse_clk(struct device *dev,
                        simple_dai->sysclk = clk_get_rate(clk);
        }
 
+       dev_dbg(dev, "%s : sysclk = %d\n", name, simple_dai->sysclk);
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(asoc_simple_card_parse_clk);
index 1da0e2b068c3b9d12265fdb3755961d0e225d5e7..e86c6e16146b7c7636c009da6cf12e7fea7fe783 100644 (file)
@@ -301,13 +301,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *node,
        dai_link->ops = &asoc_simple_card_ops;
        dai_link->init = asoc_simple_card_dai_init;
 
-       dev_dbg(dev, "\tcpu : %s / %d\n",
-               dai_link->cpu_dai_name,
-               dai_props->cpu_dai.sysclk);
-       dev_dbg(dev, "\tcodec : %s / %d\n",
-               dai_link->codec_dai_name,
-               dai_props->codec_dai.sysclk);
-
        asoc_simple_card_canonicalize_cpu(dai_link, single_cpu);
 
 dai_link_of_err:
index 5f4384f322c10f3e221721e62946b005a97be72c..9a251400685edbc4c93c355d0ca3333a44584922 100644 (file)
@@ -189,11 +189,6 @@ static int asoc_simple_card_dai_link_of(struct device_node *np,
        dai_link->ops                   = &asoc_simple_card_ops;
        dai_link->init                  = asoc_simple_card_dai_init;
 
-       dev_dbg(dev, "\t%s / %04x / %d\n",
-               dai_link->name,
-               dai_link->dai_fmt,
-               dai_props->sysclk);
-
        return 0;
 }