staging: ced1401: fix ced_read_huff()
Rename camel case arguments and locals in function ced_read_huff() Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2459d8e45e
commit
6bcee5d07a
1 changed files with 23 additions and 20 deletions
|
@ -984,35 +984,38 @@ static bool ced_read_word(unsigned short *word, char *buf, unsigned int *n_done,
|
||||||
** to indicate three byte total.
|
** to indicate three byte total.
|
||||||
**
|
**
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
static bool ced_read_huff(volatile unsigned int *pDWord, char *pBuf,
|
static bool ced_read_huff(volatile unsigned int *word, char *buf,
|
||||||
unsigned int *pdDone, unsigned int dGot)
|
unsigned int *n_done, unsigned int got)
|
||||||
{
|
{
|
||||||
unsigned char ucData; /* for each read to ced_read_char */
|
unsigned char c; /* for each read to ced_read_char */
|
||||||
bool bReturn = true; /* assume we will succeed */
|
bool retval = true; /* assume we will succeed */
|
||||||
unsigned int dwData = 0; /* Accumulator for the data */
|
unsigned int data = 0; /* Accumulator for the data */
|
||||||
|
|
||||||
if (ced_read_char(&ucData, pBuf, pdDone, dGot)) {
|
if (ced_read_char(&c, buf, n_done, got)) {
|
||||||
dwData = ucData; /* copy the data */
|
data = c; /* copy the data */
|
||||||
if ((dwData & 0x00000080) != 0) { /* Bit set for more data ? */
|
if ((data & 0x00000080) != 0) { /* Bit set for more data ? */
|
||||||
dwData &= 0x0000007F; /* Clear the relevant bit */
|
data &= 0x0000007F; /* Clear the relevant bit */
|
||||||
if (ced_read_char(&ucData, pBuf, pdDone, dGot)) {
|
if (ced_read_char(&c, buf, n_done, got)) {
|
||||||
dwData = (dwData << 8) | ucData;
|
data = (data << 8) | c;
|
||||||
if ((dwData & 0x00004000) != 0) { /* three byte sequence ? */
|
|
||||||
dwData &= 0x00003FFF; /* Clear the relevant bit */
|
/* three byte sequence ? */
|
||||||
|
if ((data & 0x00004000) != 0) {
|
||||||
|
/* Clear the relevant bit */
|
||||||
|
data &= 0x00003FFF;
|
||||||
if (ced_read_char
|
if (ced_read_char
|
||||||
(&ucData, pBuf, pdDone, dGot))
|
(&c, buf, n_done, got))
|
||||||
dwData = (dwData << 8) | ucData;
|
data = (data << 8) | c;
|
||||||
else
|
else
|
||||||
bReturn = false;
|
retval = false;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
bReturn = false; /* couldn't read data */
|
retval = false; /* couldn't read data */
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
bReturn = false;
|
retval = false;
|
||||||
|
|
||||||
*pDWord = dwData; /* return the data */
|
*word = data; /* return the data */
|
||||||
return bReturn;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
|
|
Loading…
Add table
Reference in a new issue