forked from len0rd/rockbox
fix red again
Change-Id: I8e7ccbcf8a856bc3e08145a795695fb675794495
This commit is contained in:
parent
c5c4ea4648
commit
f791f5ef78
2 changed files with 6 additions and 12 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue