* [PATCH] i2c_probe: fix wrong start and stop addresses
@ 2016-04-13 21:24 Miquel Raynal
2016-04-15 5:33 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Miquel Raynal @ 2016-04-13 21:24 UTC (permalink / raw)
To: barebox
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c_probe: fix wrong start and stop addresses
2016-04-13 21:24 [PATCH] i2c_probe: fix wrong start and stop addresses Miquel Raynal
@ 2016-04-15 5:33 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2016-04-15 5:33 UTC (permalink / raw)
To: Miquel Raynal; +Cc: barebox
On Wed, Apr 13, 2016 at 11:24:34PM +0200, Miquel Raynal wrote:
> 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(-)
Applied, thanks
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-15 5:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 21:24 [PATCH] i2c_probe: fix wrong start and stop addresses Miquel Raynal
2016-04-15 5:33 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox