Skip to content

Commit

Permalink
procfs: use kbasename()
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed Dec 18, 2012
1 parent 2fbc57c commit f9a00e8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions fs/proc/proc_devtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,7 @@ void proc_device_tree_add_node(struct device_node *np,
set_node_proc_entry(np, de);
for (child = NULL; (child = of_get_next_child(np, child));) {
/* Use everything after the last slash, or the full name */
p = strrchr(child->full_name, '/');
if (!p)
p = child->full_name;
else
++p;
p = kbasename(child->full_name);

if (duplicate_name(de, p))
p = fixup_name(np, de, p);
Expand Down

0 comments on commit f9a00e8

Please sign in to comment.