[PATCH] rcar: src: skip disabled-SRC nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The current device tree representation of the R-Car Sample Rate Converters
(SRC) assumes that they are numbered consecutively, starting from 0. Alas,
this  is not  the case with the R8A7794 SoC where SRC0 isn't present.  In
order to keep the existing  device trees working, I'm suggesting to use a
disabled node for SRC0.  Teach the SRC probe  to just skip disabled nodes.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@xxxxxxxxxxxxxxxxxx>

---
The patch is against the 'for-next' branch of Mark Brown's 'sound.git' repo.

sound/soc/sh/rcar/src.c |    4 ++++
 sound/soc/sh/rcar/src.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: sound/sound/soc/sh/rcar/src.c
===================================================================
--- sound.orig/sound/soc/sh/rcar/src.c
+++ sound/sound/soc/sh/rcar/src.c
@@ -572,6 +572,9 @@ int rsnd_src_probe(struct rsnd_priv *pri
 
 	i = 0;
 	for_each_child_of_node(node, np) {
+		if (!of_device_is_available(np))
+			goto skip;
+
 		src = rsnd_src_get(priv, i);
 
 		snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
@@ -595,6 +598,7 @@ int rsnd_src_probe(struct rsnd_priv *pri
 		if (ret)
 			goto rsnd_src_probe_done;
 
+skip:
 		i++;
 	}
 




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux