Commit 3c469dfd authored by Luca Ellero's avatar Luca Ellero Committed by Greg Kroah-Hartman

staging: ced1401: rename SendChars()

rename camel case function SendChars() to ced_send_chars()
Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7c7aaa83
...@@ -92,7 +92,7 @@ static int PutChars(DEVICE_EXTENSION *pdx, const char *pCh, ...@@ -92,7 +92,7 @@ static int PutChars(DEVICE_EXTENSION *pdx, const char *pCh,
} }
pdx->dwNumOutput += uCount; pdx->dwNumOutput += uCount;
spin_unlock_irq(&pdx->charOutLock); spin_unlock_irq(&pdx->charOutLock);
iReturn = SendChars(pdx); /* ...give a chance to transmit data */ iReturn = ced_send_chars(pdx); /* ...give a chance to transmit data */
} else { } else {
iReturn = U14ERR_NOOUT; /* no room at the out (ha-ha) */ iReturn = U14ERR_NOOUT; /* no room at the out (ha-ha) */
spin_unlock_irq(&pdx->charOutLock); spin_unlock_irq(&pdx->charOutLock);
...@@ -427,7 +427,7 @@ int GetChar(DEVICE_EXTENSION *pdx) ...@@ -427,7 +427,7 @@ int GetChar(DEVICE_EXTENSION *pdx)
dev_dbg(&pdx->interface->dev, "%s\n", __func__); dev_dbg(&pdx->interface->dev, "%s\n", __func__);
Allowi(pdx); /* Make sure char reads are running */ Allowi(pdx); /* Make sure char reads are running */
SendChars(pdx); /* and send any buffered chars */ ced_send_chars(pdx); /* and send any buffered chars */
spin_lock_irq(&pdx->charInLock); spin_lock_irq(&pdx->charInLock);
if (pdx->dwNumInput > 0) { /* worth looking */ if (pdx->dwNumInput > 0) { /* worth looking */
...@@ -465,7 +465,7 @@ int GetString(DEVICE_EXTENSION *pdx, char __user *pUser, int n) ...@@ -465,7 +465,7 @@ int GetString(DEVICE_EXTENSION *pdx, char __user *pUser, int n)
mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */ mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */
Allowi(pdx); /* Make sure char reads are running */ Allowi(pdx); /* Make sure char reads are running */
SendChars(pdx); /* and send any buffered chars */ ced_send_chars(pdx); /* and send any buffered chars */
spin_lock_irq(&pdx->charInLock); spin_lock_irq(&pdx->charInLock);
nAvailable = pdx->dwNumInput; /* characters available now */ nAvailable = pdx->dwNumInput; /* characters available now */
...@@ -521,7 +521,7 @@ int Stat1401(DEVICE_EXTENSION *pdx) ...@@ -521,7 +521,7 @@ int Stat1401(DEVICE_EXTENSION *pdx)
int iReturn; int iReturn;
mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */ mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */
Allowi(pdx); /* make sure we allow pending chars */ Allowi(pdx); /* make sure we allow pending chars */
SendChars(pdx); /* in both directions */ ced_send_chars(pdx); /* in both directions */
iReturn = pdx->dwNumInput; /* no lock as single read */ iReturn = pdx->dwNumInput; /* no lock as single read */
mutex_unlock(&pdx->io_mutex); /* Protect disconnect from new i/o */ mutex_unlock(&pdx->io_mutex); /* Protect disconnect from new i/o */
return iReturn; return iReturn;
...@@ -540,7 +540,7 @@ int LineCount(DEVICE_EXTENSION *pdx) ...@@ -540,7 +540,7 @@ int LineCount(DEVICE_EXTENSION *pdx)
mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */ mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */
Allowi(pdx); /* Make sure char reads are running */ Allowi(pdx); /* Make sure char reads are running */
SendChars(pdx); /* and send any buffered chars */ ced_send_chars(pdx); /* and send any buffered chars */
spin_lock_irq(&pdx->charInLock); /* Get protection */ spin_lock_irq(&pdx->charInLock); /* Get protection */
if (pdx->dwNumInput > 0) { /* worth looking? */ if (pdx->dwNumInput > 0) { /* worth looking? */
...@@ -570,7 +570,7 @@ int GetOutBufSpace(DEVICE_EXTENSION *pdx) ...@@ -570,7 +570,7 @@ int GetOutBufSpace(DEVICE_EXTENSION *pdx)
{ {
int iReturn; int iReturn;
mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */ mutex_lock(&pdx->io_mutex); /* Protect disconnect from new i/o */
SendChars(pdx); /* send any buffered chars */ ced_send_chars(pdx); /* send any buffered chars */
iReturn = (int)(OUTBUF_SZ - pdx->dwNumOutput); /* no lock needed for single read */ iReturn = (int)(OUTBUF_SZ - pdx->dwNumOutput); /* no lock needed for single read */
dev_dbg(&pdx->interface->dev, "%s: %d\n", __func__, iReturn); dev_dbg(&pdx->interface->dev, "%s: %d\n", __func__, iReturn);
mutex_unlock(&pdx->io_mutex); /* Protect disconnect from new i/o */ mutex_unlock(&pdx->io_mutex); /* Protect disconnect from new i/o */
......
...@@ -333,11 +333,11 @@ static void ced_writechar_callback(struct urb *pUrb) ...@@ -333,11 +333,11 @@ static void ced_writechar_callback(struct urb *pUrb)
} }
/**************************************************************************** /****************************************************************************
** SendChars ** ced_send_chars
** Transmit the characters in the output buffer to the 1401. This may need ** Transmit the characters in the output buffer to the 1401. This may need
** breaking down into multiple transfers. ** breaking down into multiple transfers.
****************************************************************************/ ****************************************************************************/
int SendChars(DEVICE_EXTENSION *pdx) int ced_send_chars(DEVICE_EXTENSION *pdx)
{ {
int iReturn = U14ERR_NOERROR; int iReturn = U14ERR_NOERROR;
......
...@@ -202,7 +202,7 @@ typedef struct _DEVICE_EXTENSION { ...@@ -202,7 +202,7 @@ typedef struct _DEVICE_EXTENSION {
/* Definitions of routimes used between compilation object files */ /* Definitions of routimes used between compilation object files */
/* in usb1401.c */ /* in usb1401.c */
extern int Allowi(DEVICE_EXTENSION *pdx); extern int Allowi(DEVICE_EXTENSION *pdx);
extern int SendChars(DEVICE_EXTENSION *pdx); extern int ced_send_chars(DEVICE_EXTENSION *pdx);
extern void ced_draw_down(DEVICE_EXTENSION *pdx); extern void ced_draw_down(DEVICE_EXTENSION *pdx);
extern int ReadWriteMem(DEVICE_EXTENSION *pdx, bool Read, unsigned short wIdent, extern int ReadWriteMem(DEVICE_EXTENSION *pdx, bool Read, unsigned short wIdent,
unsigned int dwOffs, unsigned int dwLen); unsigned int dwOffs, unsigned int dwLen);
......
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