ASoC: rsnd: tidyup rsnd_parse_connect_common()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 31 May 2021 04:19:09 +0000 (13:19 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 1 Jun 2021 13:04:13 +0000 (14:04 +0100)
This patch adds "char *name" to rsnd_parse_connect_common().
It is not yet used so far, but is preparation for
next "ASoC: rsnd: adjust disabled module" patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6obk01v.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/rsnd.h

index 2dc8aee..c85f131 100644 (file)
@@ -1125,7 +1125,7 @@ static void rsnd_parse_connect_graph(struct rsnd_priv *priv,
        of_node_put(remote_node);
 }
 
-void rsnd_parse_connect_common(struct rsnd_dai *rdai,
+void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name,
                struct rsnd_mod* (*mod_get)(struct rsnd_priv *priv, int id),
                struct device_node *node,
                struct device_node *playback,
index d712615..9269ab8 100644 (file)
@@ -460,7 +460,7 @@ struct rsnd_mod *rsnd_mod_next(int *iterator,
 #define for_each_rsnd_mod_array(iterator, pos, io, array)              \
        for_each_rsnd_mod_arrays(iterator, pos, io, array, ARRAY_SIZE(array))
 
-void rsnd_parse_connect_common(struct rsnd_dai *rdai,
+void rsnd_parse_connect_common(struct rsnd_dai *rdai, char *name,
                struct rsnd_mod* (*mod_get)(struct rsnd_priv *priv, int id),
                struct device_node *node,
                struct device_node *playback,
@@ -827,7 +827,7 @@ unsigned int rsnd_src_get_rate(struct rsnd_priv *priv,
 
 #define rsnd_src_of_node(priv) rsnd_parse_of_node(priv, RSND_NODE_SRC)
 #define rsnd_parse_connect_src(rdai, playback, capture)                        \
-       rsnd_parse_connect_common(rdai, rsnd_src_mod_get,               \
+       rsnd_parse_connect_common(rdai, "src", rsnd_src_mod_get,        \
                                  rsnd_src_of_node(rsnd_rdai_to_priv(rdai)), \
                                                   playback, capture)
 
@@ -839,7 +839,7 @@ void rsnd_ctu_remove(struct rsnd_priv *priv);
 struct rsnd_mod *rsnd_ctu_mod_get(struct rsnd_priv *priv, int id);
 #define rsnd_ctu_of_node(priv) rsnd_parse_of_node(priv, RSND_NODE_CTU)
 #define rsnd_parse_connect_ctu(rdai, playback, capture)                        \
-       rsnd_parse_connect_common(rdai, rsnd_ctu_mod_get,               \
+       rsnd_parse_connect_common(rdai, "ctu", rsnd_ctu_mod_get,        \
                                  rsnd_ctu_of_node(rsnd_rdai_to_priv(rdai)), \
                                                   playback, capture)
 
@@ -851,7 +851,7 @@ void rsnd_mix_remove(struct rsnd_priv *priv);
 struct rsnd_mod *rsnd_mix_mod_get(struct rsnd_priv *priv, int id);
 #define rsnd_mix_of_node(priv) rsnd_parse_of_node(priv, RSND_NODE_MIX)
 #define rsnd_parse_connect_mix(rdai, playback, capture)                        \
-       rsnd_parse_connect_common(rdai, rsnd_mix_mod_get,               \
+       rsnd_parse_connect_common(rdai, "mix", rsnd_mix_mod_get,        \
                                  rsnd_mix_of_node(rsnd_rdai_to_priv(rdai)), \
                                                   playback, capture)
 
@@ -863,7 +863,7 @@ void rsnd_dvc_remove(struct rsnd_priv *priv);
 struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id);
 #define rsnd_dvc_of_node(priv) rsnd_parse_of_node(priv, RSND_NODE_DVC)
 #define rsnd_parse_connect_dvc(rdai, playback, capture)                        \
-       rsnd_parse_connect_common(rdai, rsnd_dvc_mod_get,               \
+       rsnd_parse_connect_common(rdai, "dvc", rsnd_dvc_mod_get,        \
                                  rsnd_dvc_of_node(rsnd_rdai_to_priv(rdai)), \
                                                   playback, capture)