Commit:     fc583411617bf8a466c68350697a806704e88fc3
Parent:     5adeef52ccc0229e06a6e0b2fefe442d8779f025
Author:     Scott Wood <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 12 14:41:53 2007 -0600
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Mar 16 15:49:08 2007 +1100

    [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 <[EMAIL PROTECTED]>
    Acked-by: Mark A. Greer <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/boot/flatdevtree.c |   13 +++++++++++++
 arch/powerpc/boot/flatdevtree.h |    2 ++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/flatdevtree.c b/arch/powerpc/boot/flatdevtree.c
index e319a65..bd006f7 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 
        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;
diff --git a/arch/powerpc/boot/flatdevtree.h b/arch/powerpc/boot/flatdevtree.h
index b9cd9f6..1f37ca2 100644
--- a/arch/powerpc/boot/flatdevtree.h
+++ b/arch/powerpc/boot/flatdevtree.h
@@ -97,6 +97,8 @@ int ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
 void ft_dump_blob(const void *bphp);
 void ft_merge_blob(struct ft_cxt *cxt, void *blob);
 void *ft_find_device(struct ft_cxt *cxt, const char *srch_path);
+void *ft_find_device_rel(struct ft_cxt *cxt, const void *top,
+                         const char *srch_path);
 void *ft_find_descendent(struct ft_cxt *cxt, void *top, const char *srch_path);
 int ft_get_prop(struct ft_cxt *cxt, const void *phandle, const char *propname,
                void *buf, const unsigned int buflen);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to