Skip to contentSkip to conversation

i2c_probe: fix wrong start and stop addresses

PATCH Applied Miquel Raynal 2 participants 2 messages Apr 13, 2016 – Apr 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c_probe: fix wrong start and stop addresses

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.

---
 commands/i2c.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
commands/i2c.c +1 -1
index f4ffc99..e6750e3 100644
@@ -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)
Signature · 6 lines
1.7.10.4

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 9 lines · Miquel Raynal

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.

---
 commands/i2c.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox