summaryrefslogtreecommitdiff
path: root/fdtget.c
diff options
context:
space:
mode:
Diffstat (limited to 'fdtget.c')
-rw-r--r--fdtget.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fdtget.c b/fdtget.c
index 6cc5242..34d8194 100644
--- a/fdtget.c
+++ b/fdtget.c
@@ -140,7 +140,6 @@ static int show_data(struct display_info *disp, const char *data, int len)
*/
static int list_properties(const void *blob, int node)
{
- const struct fdt_property *data;
const char *name;
int prop;
@@ -149,8 +148,7 @@ static int list_properties(const void *blob, int node)
/* Stop silently when there are no more properties */
if (prop < 0)
return prop == -FDT_ERR_NOTFOUND ? 0 : prop;
- data = fdt_get_property_by_offset(blob, prop, NULL);
- name = fdt_string(blob, fdt32_to_cpu(data->nameoff));
+ fdt_getprop_by_offset(blob, prop, &name, NULL);
if (name)
puts(name);
prop = fdt_next_property_offset(blob, prop);