diff options
author | Scott Wood <scottwood@freescale.com> | 2007-03-12 14:41:53 -0600 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-16 15:49:08 +1100 |
commit | fc583411617bf8a466c68350697a806704e88fc3 (patch) | |
tree | 816cd7bd2872f30dc8ffe0a9cd2bbfd9deaf9cc8 /arch/powerpc/boot/flatdevtree.c | |
parent | 5adeef52ccc0229e06a6e0b2fefe442d8779f025 (diff) | |
download | linux-fc583411617bf8a466c68350697a806704e88fc3.tar.gz linux-fc583411617bf8a466c68350697a806704e88fc3.tar.bz2 linux-fc583411617bf8a466c68350697a806704e88fc3.zip |
[POWERPC] bootwrapper: Add ft_find_device_rel().
Add a function to look up a relative, rather than absolute, path name.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/flatdevtree.c')
-rw-r--r-- | arch/powerpc/boot/flatdevtree.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c index e319a6502918..bd006f75e5ed 100644 --- a/arch/powerpc/boot/flatdevtree.c +++ b/arch/powerpc/boot/flatdevtree.c @@ -654,6 +654,19 @@ void *ft_find_device(struct ft_cxt *cxt, const char *srch_path) return ft_get_phandle(cxt, node); } +void *ft_find_device_rel(struct ft_cxt *cxt, const void *top, + const char *srch_path) +{ + char *node; + + node = ft_node_ph2node(cxt, top); + if (node == NULL) + return NULL; + + node = ft_find_descendent(cxt, node, srch_path); + return ft_get_phandle(cxt, node); +} + void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path) { struct ft_atom atom; |