diff options
author | Mihail Zenkov <mihail.zenkov@gmail.com> | 2016-04-06 00:17:59 +0000 |
---|---|---|
committer | Mihail Zenkov <mihail.zenkov@gmail.com> | 2016-04-06 00:17:59 +0000 |
commit | f791f5ef78174b71c25a767fedb405174f30f2b5 (patch) | |
tree | df9fb7ece193c5b8c6e88efb6fe3dd295d462f96 | |
parent | c5c4ea46481a492c13e5c604906c8c757316e452 (diff) | |
download | rockbox-f791f5e.tar.gz rockbox-f791f5e.zip |
fix red again
Change-Id: I8e7ccbcf8a856bc3e08145a795695fb675794495
-rw-r--r-- | firmware/target/arm/pp/ascodec-pp.c | 4 | ||||
-rw-r--r-- | firmware/target/hosted/samsungypr/ypr0/ascodec-ypr0.c | 14 |
2 files changed, 6 insertions, 12 deletions
diff --git a/firmware/target/arm/pp/ascodec-pp.c b/firmware/target/arm/pp/ascodec-pp.c index cebe5e2f6b..ed0142fc41 100644 --- a/firmware/target/arm/pp/ascodec-pp.c +++ b/firmware/target/arm/pp/ascodec-pp.c @@ -76,9 +76,9 @@ int ascodec_read(unsigned int reg) return i2c_readbyte(AS3514_I2C_ADDR, reg); } -int ascodec_readbytes(unsigned int addr, unsigned int len, unsigned char *data) +void ascodec_readbytes(unsigned int addr, unsigned int len, unsigned char *data) { - return i2c_readbytes(AS3514_I2C_ADDR, addr, len, data); + void i2c_readbytes(AS3514_I2C_ADDR, addr, len, data); } void ascodec_lock(void) diff --git a/firmware/target/hosted/samsungypr/ypr0/ascodec-ypr0.c b/firmware/target/hosted/samsungypr/ypr0/ascodec-ypr0.c index 972b2b4a4e..c4cd4add37 100644 --- a/firmware/target/hosted/samsungypr/ypr0/ascodec-ypr0.c +++ b/firmware/target/hosted/samsungypr/ypr0/ascodec-ypr0.c @@ -100,18 +100,12 @@ int ascodec_read_pmu(unsigned int index, unsigned int subreg) return retval; } -int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data) +void ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data) { - int i, val, ret = 0; + unsigned int i; - for (i = 0; i < (int)len; i++) - { - val = ascodec_read(i + index); - if (val >= 0) data[i] = val; - else ret = -1; - } - - return (ret ?: (int)len); + for (i = 0; i < len; i++) + data[i] = ascodec_read(i + index); } /* |