From e2f2a93b6384cfe0face0be595bfbda1475d864b Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Sun, 10 Oct 2010 21:52:57 -0600 Subject: of/promtree: add package-to-path support to pdt package-to-path is a PROM function which tells us the real (full) name of the node. This provides a hook for that in the prom ops struct, and makes use of it in the pdt code when attempting to determine a node's name. If the hook is available, try using it (falling back to looking at the "name" property if it fails). Signed-off-by: Andres Salomon Signed-off-by: Grant Likely --- include/linux/of_pdt.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/of_pdt.h') diff --git a/include/linux/of_pdt.h b/include/linux/of_pdt.h index 0f7d0c56348a..c65a18a0cfdf 100644 --- a/include/linux/of_pdt.h +++ b/include/linux/of_pdt.h @@ -29,6 +29,9 @@ struct of_pdt_ops { /* phandles are 0 if no child or sibling exists */ phandle (*getchild)(phandle parent); phandle (*getsibling)(phandle node); + + /* return 0 on success; fill in 'len' with number of bytes in path */ + int (*pkg2path)(phandle node, char *buf, const int buflen, int *len); }; extern void *prom_early_alloc(unsigned long size); -- cgit v1.2.3