diff options
-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); } /* |