]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
cmd: ide: Make the first device the default one
authorBin Meng <bmeng.cn@gmail.com>
Sun, 10 Sep 2017 12:12:53 +0000 (05:12 -0700)
committerTom Rini <trini@konsulko.com>
Sun, 10 Sep 2017 16:27:43 +0000 (12:27 -0400)
At present the IDE device number is initialized to -1, which means
we cannot type "ide read" command before setting the device number
via "ide device #".

For convenience, let's set the first device as the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/ide.c

index e3c32420cfe8886590dcee5478f41fa21140343d..bdb598050c13e0335743c1ca40f26ce16ace3b9b 100644 (file)
--- a/cmd/ide.c
+++ b/cmd/ide.c
@@ -30,7 +30,7 @@
 #endif
 
 /* Current I/O Device  */
-static int curr_device = -1;
+static int curr_device;
 
 int do_ide(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
 {