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/fdtdec.c | |
parent | 746667f1e56bf08d03e66a178df3c4f4f6c806e1 (diff) | |
parent | 17b28edb37a33d0c89089faf36e4edd7084f65fa (diff) |
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/fdtdec.c')
-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 aafc4f93150..e8775df5d00 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; } |