use fdt_path_getprop_namelen() in fdt_get_alias_namelen()
Simplify the code by making use of the new helper. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
parent
df09327928
commit
18f5ec12a1
|
@ -537,13 +537,7 @@ static const void *fdt_path_getprop_namelen(const void *fdt, const char *path,
|
|||
const char *fdt_get_alias_namelen(const void *fdt,
|
||||
const char *name, int namelen)
|
||||
{
|
||||
int aliasoffset;
|
||||
|
||||
aliasoffset = fdt_path_offset(fdt, "/aliases");
|
||||
if (aliasoffset < 0)
|
||||
return NULL;
|
||||
|
||||
return fdt_getprop_namelen(fdt, aliasoffset, name, namelen, NULL);
|
||||
return fdt_path_getprop_namelen(fdt, "/aliases", name, namelen, NULL);
|
||||
}
|
||||
|
||||
const char *fdt_get_alias(const void *fdt, const char *name)
|
||||
|
|
Loading…
Reference in New Issue