summaryrefslogtreecommitdiffstats
path: root/drivers/of/resolver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/resolver.c')
-rw-r--r--drivers/of/resolver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/resolver.c b/drivers/of/resolver.c
index 771f4844c781..63626d7d9adb 100644
--- a/drivers/of/resolver.c
+++ b/drivers/of/resolver.c
@@ -165,8 +165,8 @@ err_fail:
static int node_name_cmp(const struct device_node *dn1,
const struct device_node *dn2)
{
- const char *n1 = strrchr(dn1->full_name, '/') ? : "/";
- const char *n2 = strrchr(dn2->full_name, '/') ? : "/";
+ const char *n1 = kbasename(dn1->full_name);
+ const char *n2 = kbasename(dn2->full_name);
return of_node_cmp(n1, n2);
}