dtoc: Export the _FindNode() function
This is useful for clients that want to find a node. Export it so it can
be used by others.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index 9d69b42..01e39b8 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -181,7 +181,7 @@
self.subnodes = []
self.props = {}
- def _FindNode(self, name):
+ def FindNode(self, name):
"""Find a node given its name
Args:
@@ -349,7 +349,7 @@
if len(parts) < 2:
return None
for part in parts[1:]:
- node = node._FindNode(part)
+ node = node.FindNode(part)
if not node:
return None
return node