mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] fs: devfs-core: Make use of devpath_to_name()
@ 2018-06-24 21:29 Andrey Smirnov
  2018-06-24 21:29 ` [PATCH 2/4] commands: mount: " Andrey Smirnov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Andrey Smirnov @ 2018-06-24 21:29 UTC (permalink / raw)
  To: barebox; +Cc: Andrey Smirnov

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 fs/devfs-core.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/devfs-core.c b/fs/devfs-core.c
index 6b5e6da6a..f017e1c55 100644
--- a/fs/devfs-core.c
+++ b/fs/devfs-core.c
@@ -28,6 +28,7 @@
 #include <linux/fs.h>
 #include <linux/mtd/mtd.h>
 #include <unistd.h>
+#include <fs.h>
 
 LIST_HEAD(cdev_list);
 
@@ -155,10 +156,7 @@ struct cdev *cdev_open(const char *name, unsigned long flags)
 	struct cdev *cdev;
 	int ret;
 
-	if (!strncmp(name, "/dev/", 5))
-		name += 5;
-
-	cdev = cdev_by_name(name);
+	cdev = cdev_by_name(devpath_to_name(name));
 	if (!cdev)
 		return NULL;
 
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-25 20:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-24 21:29 [PATCH 1/4] fs: devfs-core: Make use of devpath_to_name() Andrey Smirnov
2018-06-24 21:29 ` [PATCH 2/4] commands: mount: " Andrey Smirnov
2018-06-24 21:29 ` [PATCH 3/4] commands: mmc_extcsd: " Andrey Smirnov
2018-06-24 21:29 ` [PATCH 4/4] drivers: of: " Andrey Smirnov
2018-06-25 20:03 ` [PATCH 1/4] fs: devfs-core: " Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox