This function current deals with req_seq which is deprecated. Update it to
use the new sequence numbers. Rename the function to make this clear.

Signed-off-by: Simon Glass <s...@chromium.org>
---

 drivers/core/device.c        |  7 +++----
 drivers/core/uclass.c        |  6 +++---
 include/dm/uclass-internal.h | 14 +++++++-------
 3 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/core/device.c b/drivers/core/device.c
index d57a8bc1343..d9648f9394e 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -94,16 +94,15 @@ static int device_bind_common(struct udevice *parent, const 
struct driver *drv,
                                if (dev->req_seq == -1) {
                                        auto_seq = true;
                                        dev->req_seq =
-                                               uclass_find_next_free_req_seq(
-                                                       uc);
+                                               uclass_find_next_free_seq(uc);
                                }
                        }
                } else {
                        auto_seq = true;
-                       dev->req_seq = uclass_find_next_free_req_seq(uc);
+                       dev->req_seq = uclass_find_next_free_seq(uc);
                }
                if (auto_seq && !(gd->flags & GD_FLG_DM_NO_SEQ))
-                       dev->sqq = uclass_find_next_free_req_seq(uc);
+                       dev->sqq = uclass_find_next_free_seq(uc);
        }
 
        if (drv->platdata_auto_alloc_size) {
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 48d81221c38..8d5e92da288 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -272,14 +272,14 @@ int uclass_find_device_by_name(enum uclass_id id, const 
char *name,
        return -ENODEV;
 }
 
-int uclass_find_next_free_req_seq(struct uclass *uc)
+int uclass_find_next_free_seq(struct uclass *uc)
 {
        struct udevice *dev;
        int max = -1;
 
        list_for_each_entry(dev, &uc->dev_head, uclass_node) {
-               if ((dev->req_seq != -1) && (dev->req_seq > max))
-                       max = dev->req_seq;
+               if (dev->sqq != -1 && dev->sqq > max)
+                       max = dev->sqq;
        }
 
        if (max == -1)
diff --git a/include/dm/uclass-internal.h b/include/dm/uclass-internal.h
index 9c23d3f223e..50431bd847c 100644
--- a/include/dm/uclass-internal.h
+++ b/include/dm/uclass-internal.h
@@ -12,17 +12,17 @@
 #include <dm/ofnode.h>
 
 /**
- * uclass_find_next_free_req_seq() - Get the next free req_seq number
+ * uclass_find_next_free_seq() - Get the next free sequence number
  *
- * This returns the next free req_seq number. This is useful only if
- * OF_CONTROL is not used. The next free req_seq number is simply the
- * maximum req_seq of the uclass + 1.
- * This allows assiging req_seq number in the binding order.
+ * This returns the next free sequence number. This is useful only if
+ * OF_CONTROL is not used. The next free sequence number is simply the
+ * maximum sequence number used by al devices in the uclass + 1.
+ * This allows assiging the sequence number in the binding order.
  *
  * @uc:                uclass to check
- * @return     The next free req_seq number
+ * @return     The next free sequence number
  */
-int uclass_find_next_free_req_seq(struct uclass *uc);
+int uclass_find_next_free_seq(struct uclass *uc);
 
 /**
  * uclass_get_device_tail() - handle the end of a get_device call
-- 
2.29.2.454.gaff20da3a2-goog

Reply via email to