projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2e902f
)
drivers/of/fdt.c: re-use kernel's kbasename()
author
Andy Shevchenko
<
[email protected]
>
Tue, 18 Dec 2012 00:01:28 +0000
(16:01 -0800)
committer
Linus Torvalds
<
[email protected]
>
Tue, 18 Dec 2012 01:15:18 +0000
(17:15 -0800)
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]
>
drivers/of/fdt.c
patch
|
blob
|
history
diff --git
a/drivers/of/fdt.c
b/drivers/of/fdt.c
index a65c39c473bf36368493bd794222ab45d328706c..808be06bb67e7d4eeaf4f7250fae2dace0cc0f8d 100644
(file)
--- 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;