blob: 02c9b718c06cc00d20769de84fd7878d7b6fd023 [file] [log] [blame]
From 88596adc617181ff2bd238bdf090b5a1ebef085b Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon, 2 Oct 2017 07:37:32 +0000
Subject: [PATCH 0136/1795] ASoC: rcar: skip disabled-SSI nodes
The current device tree representation of the R-Car SSI assumes that they
are numbered consecutively, starting from 0. Alas, this is not the case
with the R8A77995 (D3) SoC which SSI1/SSI2 aren't present. In order to
keep the existing device trees working, I'm suggesting to use a disabled
node for SSI0/SSI1. Teach the SSI probe to just skip disabled nodes.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 9e9e95df06433b4f89cfeef0003af091ee0ebc86)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
sound/soc/sh/rcar/ssi.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index f0fb85fda42d..fa2469042876 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -1121,6 +1121,9 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
i = 0;
for_each_child_of_node(node, np) {
+ if (!of_device_is_available(np))
+ goto skip;
+
ssi = rsnd_ssi_get(priv, i);
snprintf(name, RSND_SSI_NAME_SIZE, "%s.%d",
@@ -1157,7 +1160,7 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
of_node_put(np);
goto rsnd_ssi_probe_done;
}
-
+skip:
i++;
}
--
2.19.0