mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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>
This commit is contained in:
parent
df09327928
commit
18f5ec12a1
1 changed files with 1 additions and 7 deletions
|
@ -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 *fdt_get_alias_namelen(const void *fdt,
|
||||||
const char *name, int namelen)
|
const char *name, int namelen)
|
||||||
{
|
{
|
||||||
int aliasoffset;
|
return fdt_path_getprop_namelen(fdt, "/aliases", name, namelen, NULL);
|
||||||
|
|
||||||
aliasoffset = fdt_path_offset(fdt, "/aliases");
|
|
||||||
if (aliasoffset < 0)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
return fdt_getprop_namelen(fdt, aliasoffset, name, namelen, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *fdt_get_alias(const void *fdt, const char *name)
|
const char *fdt_get_alias(const void *fdt, const char *name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue