summaryrefslogtreecommitdiff
path: root/drivers/core/lists.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-06-22 07:54:05 (GMT)
committerSimon Glass <sjg@chromium.org>2017-07-11 16:08:20 (GMT)
commit61e51babdb674e4619165cdc180786af7ec75ae9 (patch)
tree383c6cf77d30ffea66927f25274544a9299a645f /drivers/core/lists.c
parentcb7dbe1fb017f0a1ad050a9dc91ed2c10cb998e6 (diff)
downloadu-boot-61e51babdb674e4619165cdc180786af7ec75ae9.tar.xz
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>
Diffstat (limited to 'drivers/core/lists.c')
-rw-r--r--drivers/core/lists.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index b79f26d..6067914 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -141,8 +141,7 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp)
name = ofnode_get_name(node);
dm_dbg("bind node %s\n", name);
- compat_list = (const char *)ofnode_read_prop(node, "compatible",
- &compat_length);
+ compat_list = ofnode_get_property(node, "compatible", &compat_length);
if (!compat_list) {
if (compat_length == -FDT_ERR_NOTFOUND) {
dm_dbg("Device '%s' has no compatible string\n", name);