Commit 2c50d117 authored by Luca Ellero's avatar Luca Ellero Committed by Greg Kroah-Hartman
Browse files

staging: ced1401: fix ced_put_chars()



Rename camel case arguments and locals in function ced_put_chars()

Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 500a247c
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -80,26 +80,26 @@ static void ced_flush_in_buff(struct ced_data *ced)
** Utility routine to copy chars into the output buffer and fire them off.
** Utility routine to copy chars into the output buffer and fire them off.
** called from user mode, holds char_out_lock.
** called from user mode, holds char_out_lock.
****************************************************************************/
****************************************************************************/
static int ced_put_chars(struct ced_data *ced, const char *pCh,
static int ced_put_chars(struct ced_data *ced, const char *ch,
		    unsigned int uCount)
		    unsigned int count)
{
{
	int iReturn;
	int ret;
	spin_lock_irq(&ced->char_out_lock);	/*  get the output spin lock */
	spin_lock_irq(&ced->char_out_lock);	/*  get the output spin lock */
	if ((OUTBUF_SZ - ced->num_output) >= uCount) {
	if ((OUTBUF_SZ - ced->num_output) >= count) {
		unsigned int u;
		unsigned int u;
		for (u = 0; u < uCount; u++) {
		for (u = 0; u < count; u++) {
			ced->output_buffer[ced->out_buff_put++] = pCh[u];
			ced->output_buffer[ced->out_buff_put++] = ch[u];
			if (ced->out_buff_put >= OUTBUF_SZ)
			if (ced->out_buff_put >= OUTBUF_SZ)
				ced->out_buff_put = 0;
				ced->out_buff_put = 0;
		}
		}
		ced->num_output += uCount;
		ced->num_output += count;
		spin_unlock_irq(&ced->char_out_lock);
		spin_unlock_irq(&ced->char_out_lock);
		iReturn = ced_send_chars(ced);	/*  ...give a chance to transmit data */
		ret = ced_send_chars(ced);	/*  ...give a chance to transmit data */
	} else {
	} else {
		iReturn = U14ERR_NOOUT;	/*  no room at the out (ha-ha) */
		ret = U14ERR_NOOUT;	/*  no room at the out (ha-ha) */
		spin_unlock_irq(&ced->char_out_lock);
		spin_unlock_irq(&ced->char_out_lock);
	}
	}
	return iReturn;
	return ret;
}
}


/*****************************************************************************
/*****************************************************************************