diff options
author | Simon Glass <sjg@chromium.org> | 2020-01-27 08:49:43 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-02-05 19:33:45 -0700 |
commit | 14ca9f7f5abf7b94d71cfd466fb339bf64f58bda (patch) | |
tree | 83895f7de742e7fd0c77cfa0374086f13cd1abda /drivers | |
parent | 74d594a20e035a2dfce232093774c50d986cb9ff (diff) |
dm: core: Rename ofnode_get_chosen_prop()
This function is actually intended to read a string rather than a
property. All of its current callers use it that way. Also there is no way
to return the length of the property from this function.
Rename it to better indicate its purpose, using ofnode_read as the prefix
since this matches most other functions.
Also add some tests which are missing for these functions.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/core/ofnode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 8f0eab2ca6..011b43bc02 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -419,7 +419,7 @@ ofnode ofnode_path(const char *path) return offset_to_ofnode(fdt_path_offset(gd->fdt_blob, path)); } -const char *ofnode_get_chosen_prop(const char *name) +const char *ofnode_read_chosen_string(const char *name) { ofnode chosen_node; @@ -432,7 +432,7 @@ ofnode ofnode_get_chosen_node(const char *name) { const char *prop; - prop = ofnode_get_chosen_prop(name); + prop = ofnode_read_chosen_string(name); if (!prop) return ofnode_null(); |