ASoC: rsnd: src: add rsnd_src_of_node()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 20 Feb 2015 10:30:22 +0000 (10:30 +0000)
committerMark Brown <broonie@kernel.org>
Sat, 7 Mar 2015 15:04:30 +0000 (15:04 +0000)
This patch adds rsnd_src_of_node() to get SRC subnode from DT.
This is prepare for new DT bindings for 1st DMAC

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/src.c

index e2792056ce24e0e28f67cc125f4b7b8e6d464d68..5a601bed415457a354748023f33e7a9fcac553ec 100644 (file)
@@ -28,6 +28,9 @@ struct rsnd_src {
 #define RSND_SRC_NAME_SIZE 16
 
 #define rsnd_src_convert_rate(p) ((p)->info->convert_rate)
+#define rsnd_src_of_node(priv) \
+       of_get_child_by_name(rsnd_priv_to_dev(priv)->of_node, "rcar_sound,src")
+
 #define rsnd_mod_to_src(_mod)                          \
        container_of((_mod), struct rsnd_src, mod)
 
@@ -807,7 +810,7 @@ static void rsnd_of_parse_src(struct platform_device *pdev,
        if (!of_data)
                return;
 
-       src_node = of_get_child_by_name(dev->of_node, "rcar_sound,src");
+       src_node = rsnd_src_of_node(priv);
        if (!src_node)
                return;