diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2012-12-17 19:01:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:17 -0500 |
commit | f9a00e8738c209d95493cf97d3a82ab2655892e5 (patch) | |
tree | 5f47dbfa96d540d9fdf9fa3871a79e211d6f2b0f | |
parent | 2fbc57c53a815ea30b926dd7627897a02daae302 (diff) |
procfs: use kbasename()
[yongjun_wei@trendmicro.com.cn: remove duplicated include]
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/proc/proc_devtree.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index df7dd08d4391..de20ec480fa0 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c | |||
@@ -195,11 +195,7 @@ void proc_device_tree_add_node(struct device_node *np, | |||
195 | set_node_proc_entry(np, de); | 195 | set_node_proc_entry(np, de); |
196 | for (child = NULL; (child = of_get_next_child(np, child));) { | 196 | for (child = NULL; (child = of_get_next_child(np, child));) { |
197 | /* Use everything after the last slash, or the full name */ | 197 | /* Use everything after the last slash, or the full name */ |
198 | p = strrchr(child->full_name, '/'); | 198 | p = kbasename(child->full_name); |
199 | if (!p) | ||
200 | p = child->full_name; | ||
201 | else | ||
202 | ++p; | ||
203 | 199 | ||
204 | if (duplicate_name(de, p)) | 200 | if (duplicate_name(de, p)) |
205 | p = fixup_name(np, de, p); | 201 | p = fixup_name(np, de, p); |