public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/4] cmd: ide: Make the first device the default one
Date: Mon,  4 Sep 2017 02:08:07 -0700	[thread overview]
Message-ID: <1504516087-9984-4-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1504516087-9984-1-git-send-email-bmeng.cn@gmail.com>

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>

---

Changes in v2: None

 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

  parent reply	other threads:[~2017-09-04  9:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  9:08 [U-Boot] [PATCH v2 1/4] blk: Use macros for block device vendor/product/rev string size Bin Meng
2017-09-04  9:08 ` [U-Boot] [PATCH v2 2/4] block: ide: Fix block read/write with driver model Bin Meng
2017-09-04 13:47   ` Heinrich Schuchardt
2017-09-04 14:10   ` Heinrich Schuchardt
2017-09-05  7:56     ` Bin Meng
2017-09-05  8:56   ` Simon Glass
2017-09-04  9:08 ` [U-Boot] [PATCH v2 3/4] block: ide: Don't bother to create BLK device if no CDROM inserted Bin Meng
2017-09-05  8:56   ` Simon Glass
2017-09-05  9:04     ` Bin Meng
2017-09-04  9:08 ` Bin Meng [this message]
2017-09-05  8:57   ` [U-Boot] [PATCH v2 4/4] cmd: ide: Make the first device the default one Simon Glass
2017-09-05  8:56 ` [U-Boot] [PATCH v2 1/4] blk: Use macros for block device vendor/product/rev string size Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1504516087-9984-4-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox