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:
committed by
Simon Glass
parent
cb7dbe1fb0
commit
61e51babdb
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user