Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f9a00e87 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Torvalds
Browse files

procfs: use kbasename()



[yongjun_wei@trendmicro.com.cn: remove duplicated include]
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2fbc57c5
Loading
Loading
Loading
Loading
+1 −5
Original line number Original line Diff line number Diff line
@@ -195,11 +195,7 @@ void proc_device_tree_add_node(struct device_node *np,
	set_node_proc_entry(np, de);
	set_node_proc_entry(np, de);
	for (child = NULL; (child = of_get_next_child(np, child));) {
	for (child = NULL; (child = of_get_next_child(np, child));) {
		/* Use everything after the last slash, or the full name */
		/* Use everything after the last slash, or the full name */
		p = strrchr(child->full_name, '/');
		p = kbasename(child->full_name);
		if (!p)
			p = child->full_name;
		else
			++p;


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