diff options
author | Andy Shevchenko <[email protected]> | 2012-12-17 16:01:28 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-12-17 17:15:18 -0800 |
commit | 375da3a76dc49f10c35e243ebef62df12e3adf4e (patch) | |
tree | 4a0fe978c099114f1192e93df055095709c45d48 | |
parent | b2e902f024fa6f6f27b335c478d81bab0cb2c768 (diff) |
drivers/of/fdt.c: re-use kernel's kbasename()
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Grant Likely <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Fabio Estevam <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-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, depth++; pathp = (char *)p; p = ALIGN(p + strlen(pathp) + 1, 4); - if ((*pathp) == '/') { - const char *lp, *np; - for (lp = NULL, np = pathp; *np; np++) - if ((*np) == '/') - lp = np+1; - if (lp != NULL) - pathp = lp; - } + if (*pathp == '/') + pathp = kbasename(pathp); rc = it(p, pathp, depth, data); if (rc != 0) break; |