Commit 13f9c568 authored by Luca Ellero's avatar Luca Ellero Committed by Greg Kroah-Hartman

staging: ced1401: fix ced_handle_esc()

Rename camel case arguments and locals in function ced_handle_esc()
Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd058483
...@@ -1122,25 +1122,28 @@ static bool ced_read_dma_info(volatile struct dmadesc *dma_desc, ...@@ -1122,25 +1122,28 @@ static bool ced_read_dma_info(volatile struct dmadesc *dma_desc,
** **
** Parameters are ** Parameters are
** **
** dwCount - the number of characters in the device extension char in buffer, ** count - the number of characters in the device extension char in buffer,
** this is known to be at least 2 or we will not be called. ** this is known to be at least 2 or we will not be called.
** **
****************************************************************************/ ****************************************************************************/
static int ced_handle_esc(struct ced_data *ced, char *pCh, static int ced_handle_esc(struct ced_data *ced, char *ch,
unsigned int dwCount) unsigned int count)
{ {
int iReturn = U14ERR_FAIL; int retval = U14ERR_FAIL;
/* I have no idea what this next test is about. '?' is 0x3f, which is area 3, code */ /* I have no idea what this next test is about. '?' is 0x3f, which is */
/* 15. At the moment, this is not used, so it does no harm, but unless someone can */ /* area 3, code 15. At the moment, this is not used, so it does no */
/* tell me what this is for, it should be removed from this and the Windows driver. */ /* harm, but unless someone can tell me what this is for, it should */
if (pCh[0] == '?') { /* Is this an information response */ /* be removed from this and the Windows driver. */
if (ch[0] == '?') { /* Is this an information response */
/* Parse and save the information */ /* Parse and save the information */
} else { } else {
spin_lock(&ced->staged_lock); /* Lock others out */ spin_lock(&ced->staged_lock); /* Lock others out */
if (ced_read_dma_info(&ced->dma_info, ced, pCh, dwCount)) { /* Get DMA parameters */ /* Get DMA parameters */
unsigned short wTransType = ced->dma_info.trans_type; /* check transfer type */ if (ced_read_dma_info(&ced->dma_info, ced, ch, count)) {
/* check transfer type */
unsigned short trans_type = ced->dma_info.trans_type;
dev_dbg(&ced->interface->dev, dev_dbg(&ced->interface->dev,
"%s: xfer to %s, offset %d, length %d\n", "%s: xfer to %s, offset %d, length %d\n",
...@@ -1154,22 +1157,22 @@ static int ced_handle_esc(struct ced_data *ced, char *pCh, ...@@ -1154,22 +1157,22 @@ static int ced_handle_esc(struct ced_data *ced, char *pCh,
dev_err(&ced->interface->dev, dev_err(&ced->interface->dev,
"ERROR: DMA setup while transfer still waiting\n"); "ERROR: DMA setup while transfer still waiting\n");
} else { } else {
if ((wTransType == TM_EXTTOHOST) if ((trans_type == TM_EXTTOHOST)
|| (wTransType == TM_EXTTO1401)) { || (trans_type == TM_EXTTO1401)) {
iReturn = retval =
ced_read_write_mem(ced, ced_read_write_mem(ced,
!ced->dma_info.outward, !ced->dma_info.outward,
ced->dma_info.ident, ced->dma_info.ident,
ced->dma_info.offset, ced->dma_info.offset,
ced->dma_info.size); ced->dma_info.size);
if (iReturn != U14ERR_NOERROR) if (retval != U14ERR_NOERROR)
dev_err(&ced->interface->dev, dev_err(&ced->interface->dev,
"%s: ced_read_write_mem() failed %d\n", "%s: ced_read_write_mem() failed %d\n",
__func__, iReturn); __func__, retval);
} else /* This covers non-linear transfer setup */ } else /* This covers non-linear transfer setup */
dev_err(&ced->interface->dev, dev_err(&ced->interface->dev,
"%s: Unknown block xfer type %d\n", "%s: Unknown block xfer type %d\n",
__func__, wTransType); __func__, trans_type);
} }
} else /* Failed to read parameters */ } else /* Failed to read parameters */
dev_err(&ced->interface->dev, "%s: ced_read_dma_info() fail\n", dev_err(&ced->interface->dev, "%s: ced_read_dma_info() fail\n",
...@@ -1178,9 +1181,9 @@ static int ced_handle_esc(struct ced_data *ced, char *pCh, ...@@ -1178,9 +1181,9 @@ static int ced_handle_esc(struct ced_data *ced, char *pCh,
spin_unlock(&ced->staged_lock); /* OK here */ spin_unlock(&ced->staged_lock); /* OK here */
} }
dev_dbg(&ced->interface->dev, "%s: returns %d\n", __func__, iReturn); dev_dbg(&ced->interface->dev, "%s: returns %d\n", __func__, retval);
return iReturn; return retval;
} }
/**************************************************************************** /****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment