summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-09-07 05:27:14 +0300
committerTom Rini <trini@konsulko.com>2022-09-29 23:11:14 +0300
commit9243224687bd92674c693546a46f849b1a54c75c (patch)
tree272469ce1632ed91fda082cf1e5cbd7f2dec8b60 /include
parent4b1f5714658e98f55e9dbae58fd5000f9a3fcbd3 (diff)
downloadu-boot-9243224687bd92674c693546a46f849b1a54c75c.tar.xz
dm: core: Rename ofnode_get_property_by_prop()
The current name is quite unwieldy. Change it to use an ofprop_ prefix and shorten it. Fix the return-value comment while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/dm/ofnode.h14
-rw-r--r--include/dm/read.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/include/dm/ofnode.h b/include/dm/ofnode.h
index d477ef1762..9dcc1fed5b 100644
--- a/include/dm/ofnode.h
+++ b/include/dm/ofnode.h
@@ -802,7 +802,7 @@ const void *ofnode_get_property(ofnode node, const char *propname, int *lenp);
* ofnode_first_property()- get the reference of the first property
*
* Get reference to the first property of the node, it is used to iterate
- * and read all the property with ofnode_get_property_by_prop().
+ * and read all the property with ofprop_get_property().
*
* @node: node to read
* @prop: place to put argument reference
@@ -814,7 +814,7 @@ int ofnode_first_property(ofnode node, struct ofprop *prop);
* ofnode_next_property() - get the reference of the next property
*
* Get reference to the next property of the node, it is used to iterate
- * and read all the property with ofnode_get_property_by_prop().
+ * and read all the property with ofprop_get_property().
*
* @prop: reference of current argument and place to put reference of next one
* Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found
@@ -822,17 +822,17 @@ int ofnode_first_property(ofnode node, struct ofprop *prop);
int ofnode_next_property(struct ofprop *prop);
/**
- * ofnode_get_property_by_prop() - get a pointer to the value of a property
+ * ofprop_get_property() - get a pointer to the value of a property
*
* Get value for the property identified by the provided reference.
*
* @prop: reference on property
* @propname: If non-NULL, place to property name on success,
- * @lenp: If non-NULL, place to put length on success
- * Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found
+ * @lenp: If non-NULL, place to put length on success, or error code on failure
+ * Return: pointer to property, or NULL if not found
*/
-const void *ofnode_get_property_by_prop(const struct ofprop *prop,
- const char **propname, int *lenp);
+const void *ofprop_get_property(const struct ofprop *prop,
+ const char **propname, int *lenp);
/**
* ofnode_is_available() - check if a node is marked available
diff --git a/include/dm/read.h b/include/dm/read.h
index 519c156e1c..cc4f16196f 100644
--- a/include/dm/read.h
+++ b/include/dm/read.h
@@ -1091,7 +1091,7 @@ static inline const void *dev_read_prop_by_prop(struct ofprop *prop,
const char **propname,
int *lenp)
{
- return ofnode_get_property_by_prop(prop, propname, lenp);
+ return ofprop_get_property(prop, propname, lenp);
}
static inline int dev_read_alias_seq(const struct udevice *dev, int *devnump)