diff options
author | Tom Rini <trini@ti.com> | 2014-11-24 12:01:48 -0500 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-11-24 12:01:48 -0500 |
commit | 1739564e753bc3a8097f8937a3cbe738bdaaed5d (patch) | |
tree | 56fe759e62f129dc055b6f6a22f299f6c8b5cdde /lib | |
parent | 746667f1e56bf08d03e66a178df3c4f4f6c806e1 (diff) | |
parent | 17b28edb37a33d0c89089faf36e4edd7084f65fa (diff) | |
download | u-boot-1739564e753bc3a8097f8937a3cbe738bdaaed5d.tar.gz |
Merge git://git.denx.de/u-boot-dm
Conflicts:
drivers/serial/serial-uclass.c
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fdtdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c index aafc4f9315..e8775df5d0 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -357,9 +357,9 @@ int fdtdec_get_alias_seq(const void *blob, const char *base, int offset, slash = strrchr(prop, '/'); if (strcmp(slash + 1, find_name)) continue; - for (p = name; *p; p++) { - if (isdigit(*p)) { - *seqp = simple_strtoul(p, NULL, 10); + for (p = name + strlen(name) - 1; p > name; p--) { + if (!isdigit(*p)) { + *seqp = simple_strtoul(p + 1, NULL, 10); debug("Found seq %d\n", *seqp); return 0; } |