From: Andy Shevchenko Date: Sat, 3 Nov 2012 00:42:49 +0000 (+1100) Subject: procfs: use kbasename() X-Git-Tag: next-20121107~2^2~72 X-Git-Url: https://git.kernelconcepts.de/?a=commitdiff_plain;h=e85317d9f6550e2d22dd612b0e3c70379c7e6939;hp=e1899050ba7e7a9e2d84159ec5c7fd31291a0cff;p=karo-tx-linux.git procfs: use kbasename() Signed-off-by: Andy Shevchenko Signed-off-by: Andrew Morton --- diff --git a/fs/proc/proc_devtree.c b/fs/proc/proc_devtree.c index df7dd08d4391..3d9fd6674c71 100644 --- a/fs/proc/proc_devtree.c +++ b/fs/proc/proc_devtree.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include "internal.h" @@ -195,11 +196,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);