dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()

This function returns the pointer to the value of a node property.
The current name ofnode_read_prop() is confusing.  Follow the naming
of_get_property() from Linux.

The return type (const u32 *) is wrong.  DT property values can be
strings as well as integers.  This is why of_get_property/fdt_getprop
returns an opaque pointer.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Masahiro Yamada
2017-06-22 16:54:05 +09:00
committed by Simon Glass
parent cb7dbe1fb0
commit 61e51babdb
8 changed files with 10 additions and 11 deletions

View File

@@ -197,7 +197,7 @@ static int keyscan_read_fdt_matrix(struct ec_state *ec, ofnode node)
int upto;
int len;
cell = ofnode_read_prop(node, "linux,keymap", &len);
cell = ofnode_get_property(node, "linux,keymap", &len);
ec->matrix_count = len / 4;
ec->matrix = calloc(ec->matrix_count, sizeof(*ec->matrix));
if (!ec->matrix) {