lkml.org 
[lkml]   [2018]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/6] of: remove kbasename(of->full_name) from base.c
Date
From: Frank Rowand <frank.rowand@sony.com>

struct device_node full_name has been changed to include the
basename instead of the full path. kbasename() is no longer
needed to extract the basename from full_name.

Signed-off-by: Frank Rowand <frank.rowand@sony.com>
---
drivers/of/base.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index ad28de96e13f..926d08b8674d 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -691,8 +691,8 @@ struct device_node *__of_find_node_by_path(struct device_node *parent,
return NULL;

__for_each_child_of_node(parent, child) {
- const char *name = kbasename(child->full_name);
- if (strncmp(path, name, len) == 0 && (strlen(name) == len))
+ if (strncmp(path, child->full_name, len) == 0 &&
+ (strlen(child->full_name) == len))
return child;
}
return NULL;
--
Frank Rowand <frank.rowand@sony.com>
\
 
 \ /
  Last update: 2018-02-26 03:25    [W:0.072 / U:2.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site