dm: core: Rename ofnode_get_first/next_property()
authorSimon Glass <sjg@chromium.org>
Wed, 7 Sep 2022 02:27:13 +0000 (20:27 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 29 Sep 2022 20:11:14 +0000 (16:11 -0400)
Drop the 'get' in these names since it does not fit with the rest of
the API.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/ofnode.c
drivers/core/read.c
env/common.c
include/dm/ofnode.h
include/dm/read.h
test/dm/ofread.c

index caf28c6..2feca56 100644 (file)
@@ -780,7 +780,7 @@ const void *ofnode_get_property(ofnode node, const char *propname, int *lenp)
                                   propname, lenp);
 }
 
-int ofnode_get_first_property(ofnode node, struct ofprop *prop)
+int ofnode_first_property(ofnode node, struct ofprop *prop)
 {
        prop->node = node;
 
@@ -799,7 +799,7 @@ int ofnode_get_first_property(ofnode node, struct ofprop *prop)
        return 0;
 }
 
-int ofnode_get_next_property(struct ofprop *prop)
+int ofnode_next_property(struct ofprop *prop)
 {
        if (ofnode_is_np(prop->node)) {
                prop->prop = of_get_next_property(ofnode_to_np(prop->node),
index 07ab8ab..df298d5 100644 (file)
@@ -287,12 +287,12 @@ const void *dev_read_prop(const struct udevice *dev, const char *propname,
 
 int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop)
 {
-       return ofnode_get_first_property(dev_ofnode(dev), prop);
+       return ofnode_first_property(dev_ofnode(dev), prop);
 }
 
 int dev_read_next_prop(struct ofprop *prop)
 {
-       return ofnode_get_next_property(prop);
+       return ofnode_next_property(prop);
 }
 
 const void *dev_read_prop_by_prop(struct ofprop *prop,
index 8dd05ff..4e70baa 100644 (file)
@@ -539,9 +539,9 @@ void env_import_fdt(void)
                return;
        }
 
-       for (res = ofnode_get_first_property(node, &prop);
+       for (res = ofnode_first_property(node, &prop);
             !res;
-            res = ofnode_get_next_property(&prop)) {
+            res = ofnode_next_property(&prop)) {
                const char *name, *val;
 
                val = ofnode_get_property_by_prop(&prop, &name, NULL);
index 044546f..d477ef1 100644 (file)
@@ -799,7 +799,7 @@ int ofnode_decode_display_timing(ofnode node, int index,
 const void *ofnode_get_property(ofnode node, const char *propname, int *lenp);
 
 /**
- * ofnode_get_first_property()- get the reference of the first property
+ * 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().
@@ -808,10 +808,10 @@ const void *ofnode_get_property(ofnode node, const char *propname, int *lenp);
  * @prop: place to put argument reference
  * Return: 0 if OK, -ve on error. -FDT_ERR_NOTFOUND if not found
  */
-int ofnode_get_first_property(ofnode node, struct ofprop *prop);
+int ofnode_first_property(ofnode node, struct ofprop *prop);
 
 /**
- * ofnode_get_next_property() - get the reference of the next property
+ * 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().
@@ -819,7 +819,7 @@ int ofnode_get_first_property(ofnode node, struct ofprop *prop);
  * @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
  */
-int ofnode_get_next_property(struct ofprop *prop);
+int ofnode_next_property(struct ofprop *prop);
 
 /**
  * ofnode_get_property_by_prop() - get a pointer to the value of a property
index 122b9cd..519c156 100644 (file)
@@ -569,7 +569,7 @@ const void *dev_read_prop(const struct udevice *dev, const char *propname,
 int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop);
 
 /**
- * ofnode_get_next_property() - get the reference of the next property
+ * 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 dev_read_prop_by_prop().
@@ -1079,12 +1079,12 @@ static inline const void *dev_read_prop(const struct udevice *dev,
 
 static inline int dev_read_first_prop(const struct udevice *dev, struct ofprop *prop)
 {
-       return ofnode_get_first_property(dev_ofnode(dev), prop);
+       return ofnode_first_property(dev_ofnode(dev), prop);
 }
 
 static inline int dev_read_next_prop(struct ofprop *prop)
 {
-       return ofnode_get_next_property(prop);
+       return ofnode_next_property(prop);
 }
 
 static inline const void *dev_read_prop_by_prop(struct ofprop *prop,
index 8c7dd82..95a24c3 100644 (file)
@@ -14,9 +14,9 @@ static int dm_test_ofnode_get_property_by_prop(struct unit_test_state *uts)
        int res, len, count = 0;
 
        node = ofnode_path("/cros-ec/flash");
-       for (res = ofnode_get_first_property(node, &prop);
+       for (res = ofnode_first_property(node, &prop);
             !res;
-            res = ofnode_get_next_property(&prop)) {
+            res = ofnode_next_property(&prop)) {
                value = ofnode_get_property_by_prop(&prop, &propname, &len);
                ut_assertnonnull(value);
                switch (count) {