diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2017-11-13 08:21:07 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-11-13 08:21:07 +0100 |
commit | 8489388b5b1c1a7042a46ba22f3d8ae16057946f (patch) | |
tree | 1022ff748d13cdcfecb70c1faac129117a6ddd9e /commands | |
parent | 4db085e845a24c528e1d7511b123c998f63a5688 (diff) | |
parent | 77c35e74ec5e87b1fbf456ed8635c470f1d06fef (diff) | |
download | barebox-8489388b5b1c1a7042a46ba22f3d8ae16057946f.tar.gz barebox-8489388b5b1c1a7042a46ba22f3d8ae16057946f.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r-- | commands/i2c.c | 2 | ||||
-rw-r--r-- | commands/spi.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/commands/i2c.c b/commands/i2c.c index 573032ab15..b74c53509f 100644 --- a/commands/i2c.c +++ b/commands/i2c.c @@ -129,7 +129,7 @@ static int do_i2c_write(int argc, char *argv[]) buf = xmalloc(count); for (i = 0; i < count; i++) - *(buf + i) = (char) simple_strtol(argv[optind+i], NULL, 16); + *(buf + i) = (char) simple_strtol(argv[optind+i], NULL, 0); ret = i2c_write_reg(&client, reg | wide, buf, count); if (ret != count) { diff --git a/commands/spi.c b/commands/spi.c index 6603b34b67..7bf193b0bb 100644 --- a/commands/spi.c +++ b/commands/spi.c @@ -84,7 +84,7 @@ static int do_spi(int argc, char *argv[]) rx_buf = xmalloc(read); for (i = 0; i < count; i++) - tx_buf[i] = (u8) simple_strtol(argv[optind + i], NULL, 16); + tx_buf[i] = (u8) simple_strtol(argv[optind + i], NULL, 0); ret = spi_write_then_read(&spi, tx_buf, count, rx_buf, read); if (ret) |