[U-Boot] [RFC PATCH v3 01/14] dm: core: Allow seq numbers to be resolved before probe

Joe Hershberger joe.hershberger at ni.com
Wed Feb 11 02:30:20 CET 2015


Before this patch, if the sequence numbers were resolved before probe,
this code would insist on defining new non-conflicting-with-itself seq
numbers. Now any "non -1" seq number is accepted as already resolved.

Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>

---

Changes in v3:
-Add seq patch to dm core

Changes in v2: None

 drivers/core/uclass.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 289a5d2..2d8b6f8 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -366,7 +366,9 @@ int uclass_resolve_seq(struct udevice *dev)
 	int seq;
 	int ret;
 
-	assert(dev->seq == -1);
+	if (dev->seq != -1)
+		return dev->seq;
+
 	ret = uclass_find_device_by_seq(dev->uclass->uc_drv->id, dev->req_seq,
 					false, &dup);
 	if (!ret) {
-- 
1.7.11.5



More information about the U-Boot mailing list