forked from Imagelibrary/rtems
add fdt_path_getprop_namelen() helper
Add a wrapper for fdt_getprop_namelen() allowing one to specify the node by path instead of offset. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
committed by
Joel Sherrill
parent
de9953c6a0
commit
981699bef0
@@ -522,6 +522,18 @@ uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
|
||||
return fdt32_ld_(php);
|
||||
}
|
||||
|
||||
static const void *fdt_path_getprop_namelen(const void *fdt, const char *path,
|
||||
const char *propname, int propnamelen,
|
||||
int *lenp)
|
||||
{
|
||||
int offset = fdt_path_offset(fdt, path);
|
||||
|
||||
if (offset < 0)
|
||||
return NULL;
|
||||
|
||||
return fdt_getprop_namelen(fdt, offset, propname, propnamelen, lenp);
|
||||
}
|
||||
|
||||
const char *fdt_get_alias_namelen(const void *fdt,
|
||||
const char *name, int namelen)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user