summaryrefslogtreecommitdiffstats
path: root/drivers/of/of_path.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/of_path.c')
-rw-r--r--drivers/of/of_path.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index e53041b0a1..f8bbf2cba1 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -20,6 +20,7 @@
#include <common.h>
#include <malloc.h>
#include <of.h>
+#include <fs.h>
#include <linux/mtd/mtd.h>
@@ -142,10 +143,7 @@ struct device_node *of_find_node_by_devpath(struct device_node *root, const char
pr_debug("%s: looking for path %s\n", __func__, path);
- if (!strncmp(path, "/dev/", 5))
- path += 5;
-
- cdev = cdev_by_name(path);
+ cdev = cdev_by_name(devpath_to_name(path));
if (!cdev) {
pr_debug("%s: cdev %s not found\n", __func__, path);
return NULL;