When the subsystem in u-boot ends up with a number, the alias parsing
mechanism was off, being confused between the actual number, and the alias
number.

Fix the code to start parsing the alias at the end of our subsystem name.

Signed-off-by: Maxime Ripard <maxime.rip...@free-electrons.com>
---
 lib/fdtdec.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 4e619c49a2ff..fc31e3576e5c 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -538,7 +538,8 @@ int fdtdec_get_alias_seq(const void *blob, const char 
*base, int offset,
                slash = strrchr(prop, '/');
                if (strcmp(slash + 1, find_name))
                        continue;
-               val = trailing_strtol(name);
+
+               val = simple_strtol(name + base_len, NULL, 10);
                if (val != -1) {
                        *seqp = val;
                        debug("Found seq %d\n", *seqp);
-- 
git-series 0.8.11
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to