diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2018-06-24 14:29:59 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-06-25 22:03:24 +0200 |
commit | 0257de4753356c5e9a3a645f025f215e3037372f (patch) | |
tree | b5710794b8df27865c57132187ee682ebec74f6a /drivers | |
parent | f20f5ec7444bec35961938ea5b7cc249a058665d (diff) | |
download | barebox-0257de4753356c5e9a3a645f025f215e3037372f.tar.gz barebox-0257de4753356c5e9a3a645f025f215e3037372f.tar.xz |
drivers: of: Make use of devpath_to_name()
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/of/of_path.c | 6 |
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; |