diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-12-17 19:01:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:18 -0500 |
commit | 375da3a76dc49f10c35e243ebef62df12e3adf4e (patch) | |
tree | 4a0fe978c099114f1192e93df055095709c45d48 /drivers | |
parent | b2e902f024fa6f6f27b335c478d81bab0cb2c768 (diff) |
drivers/of/fdt.c: re-use kernel's kbasename()
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/fdt.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index a65c39c473bf..808be06bb67e 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -488,14 +488,8 @@ int __init of_scan_flat_dt(int (*it)(unsigned long node, | |||
488 | depth++; | 488 | depth++; |
489 | pathp = (char *)p; | 489 | pathp = (char *)p; |
490 | p = ALIGN(p + strlen(pathp) + 1, 4); | 490 | p = ALIGN(p + strlen(pathp) + 1, 4); |
491 | if ((*pathp) == '/') { | 491 | if (*pathp == '/') |
492 | const char *lp, *np; | 492 | pathp = kbasename(pathp); |
493 | for (lp = NULL, np = pathp; *np; np++) | ||
494 | if ((*np) == '/') | ||
495 | lp = np+1; | ||
496 | if (lp != NULL) | ||
497 | pathp = lp; | ||
498 | } | ||
499 | rc = it(p, pathp, depth, data); | 493 | rc = it(p, pathp, depth, data); |
500 | if (rc != 0) | 494 | if (rc != 0) |
501 | break; | 495 | break; |