9
0
Fork 0

of: return root node when looking for a node with path /

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2013-01-09 23:21:32 +01:00
parent 969120f125
commit 05ed875f35
1 changed files with 3 additions and 0 deletions

View File

@ -491,6 +491,9 @@ struct device_node *of_find_node_by_path(const char *path)
{
struct device_node *np;
if (!strcmp(path, "/"))
return root_node;
list_for_each_entry(np, &allnodes, list) {
if (np->full_name && (strcmp(np->full_name, path) == 0))
return np;