summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-03 08:37:52 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-03 08:37:52 +0200
commit7b4e61bbf9462b38b496f8e151052c3081125aa4 (patch)
treea3da6659cf5b8745292ef7f2927b17a4deb05b17 /commands
parentf2a2894c27db8f5785bfc7fbaddce8873c16661f (diff)
parent221033e217e3a9778d81088801fae45e986ff2e8 (diff)
downloadbarebox-7b4e61bbf9462b38b496f8e151052c3081125aa4.tar.gz
barebox-7b4e61bbf9462b38b496f8e151052c3081125aa4.tar.xz
Merge branch 'for-next/mtd'
Conflicts: drivers/mtd/core.c
Diffstat (limited to 'commands')
-rw-r--r--commands/detect.c5
-rw-r--r--commands/mount.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/commands/detect.c b/commands/detect.c
index d8e0afc31..1586a6fb5 100644
--- a/commands/detect.c
+++ b/commands/detect.c
@@ -68,10 +68,7 @@ static int do_detect(int argc, char *argv[])
return COMMAND_ERROR_USAGE;
for (i = optind; i < argc; i++) {
- dev = get_device_by_name(argv[i]);
- if (!dev)
- return -ENODEV;
- ret = device_detect(dev);
+ ret = device_detect_by_name(argv[i]);
if (ret && option_error)
return ret;
}
diff --git a/commands/mount.c b/commands/mount.c
index 939e9bc85..aa769d46f 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -79,6 +79,8 @@ static int do_mount(int argc, char *argv[])
if (!strncmp(devstr, "/dev/", 5))
devstr += 5;
+ device_detect_by_name(devstr);
+
cdev = cdev_by_name(devstr);
if (!cdev)
return -ENOENT;