From: Miquel Raynal <raynal.miquel@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH] i2c_probe: fix wrong start and stop addresses
Date: Wed, 13 Apr 2016 23:24:34 +0200 [thread overview]
Message-ID: <20160413212434.GA4512@sun> (raw)
This patch fixes the wrong range of i2c addresses used by the i2c_probe
command when a stop address is provided. In this case the start address
(startaddr) was taking the value of the stop address and the stop address
(stopaddr) was always set to its default value.
Signed-off-by: Miquel Raynal <raynal.miquel@gmail.com>
---
commands/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/commands/i2c.c b/commands/i2c.c
index f4ffc99..e6750e3 100644
--- a/commands/i2c.c
+++ b/commands/i2c.c
@@ -55,7 +55,7 @@ static int do_i2c_probe(int argc, char *argv[])
if (argc > 2)
startaddr = simple_strtol(argv[2], NULL, 0);
if (argc > 3)
- startaddr = simple_strtol(argv[3], NULL, 0);
+ stopaddr = simple_strtol(argv[3], NULL, 0);
if (startaddr > stopaddr)
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2016-04-13 21:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 21:24 Miquel Raynal [this message]
2016-04-15 5:33 ` Sascha Hauer
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=20160413212434.GA4512@sun \
--to=raynal.miquel@gmail.com \
--cc=barebox@lists.infradead.org \
/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