From: Bin Meng Date: Sun, 3 Sep 2017 21:00:10 -0700 Subject: [U-Boot] [PATCH 4/4] cmd: ide: Make the first device the default one In-Reply-To: <1504497610-4775-1-git-send-email-bmeng.cn@gmail.com> References: <1504497610-4775-1-git-send-email-bmeng.cn@gmail.com> Message-ID: <1504497610-4775-4-git-send-email-bmeng.cn@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- cmd/ide.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ide.c b/cmd/ide.c index e3c3242..bdb5980 100644 --- 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[]) { -- 2.9.2