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 /firmware | |
parent | c5c4ea46481a492c13e5c604906c8c757316e452 (diff) | |
download | rockbox-f791f5ef78174b71c25a767fedb405174f30f2b5.tar.gz rockbox-f791f5ef78174b71c25a767fedb405174f30f2b5.zip |
fix red again
Change-Id: I8e7ccbcf8a856bc3e08145a795695fb675794495
Diffstat (limited to 'firmware')
-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) | |||
76 | return i2c_readbyte(AS3514_I2C_ADDR, reg); | 76 | return i2c_readbyte(AS3514_I2C_ADDR, reg); |
77 | } | 77 | } |
78 | 78 | ||
79 | int ascodec_readbytes(unsigned int addr, unsigned int len, unsigned char *data) | 79 | void ascodec_readbytes(unsigned int addr, unsigned int len, unsigned char *data) |
80 | { | 80 | { |
81 | return i2c_readbytes(AS3514_I2C_ADDR, addr, len, data); | 81 | void i2c_readbytes(AS3514_I2C_ADDR, addr, len, data); |
82 | } | 82 | } |
83 | 83 | ||
84 | void ascodec_lock(void) | 84 | 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) | |||
100 | return retval; | 100 | return retval; |
101 | } | 101 | } |
102 | 102 | ||
103 | int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data) | 103 | void ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data) |
104 | { | 104 | { |
105 | int i, val, ret = 0; | 105 | unsigned int i; |
106 | 106 | ||
107 | for (i = 0; i < (int)len; i++) | 107 | for (i = 0; i < len; i++) |
108 | { | 108 | data[i] = ascodec_read(i + index); |
109 | val = ascodec_read(i + index); | ||
110 | if (val >= 0) data[i] = val; | ||
111 | else ret = -1; | ||
112 | } | ||
113 | |||
114 | return (ret ?: (int)len); | ||
115 | } | 109 | } |
116 | 110 | ||
117 | /* | 111 | /* |