Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fac82f0 authored by Luca Ellero's avatar Luca Ellero Committed by Greg Kroah-Hartman
Browse files

staging: ced1401: rename Allowi()



rename camel case function Allowi() to ced_allowi()

Signed-off-by: default avatarLuca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 380dff8c
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ int SendString(DEVICE_EXTENSION *pdx, const char __user *pData,
		iReturn = PutChars(pdx, buffer, n);
	}

	Allowi(pdx);		/*  make sure we have input int */
	ced_allowi(pdx);		/*  make sure we have input int */
	mutex_unlock(&pdx->io_mutex);

	return iReturn;
@@ -140,7 +140,7 @@ int SendChar(DEVICE_EXTENSION *pdx, char c)
	mutex_lock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */
	iReturn = PutChars(pdx, &c, 1);
	dev_dbg(&pdx->interface->dev, "SendChar >%c< (0x%02x)\n", c, c);
	Allowi(pdx);	/*  Make sure char reads are running */
	ced_allowi(pdx);	/*  Make sure char reads are running */
	mutex_unlock(&pdx->io_mutex);
	return iReturn;
}
@@ -426,7 +426,7 @@ int GetChar(DEVICE_EXTENSION *pdx)

	dev_dbg(&pdx->interface->dev, "%s\n", __func__);

	Allowi(pdx);	/*  Make sure char reads are running */
	ced_allowi(pdx);	/*  Make sure char reads are running */
	ced_send_chars(pdx);	/*  and send any buffered chars */

	spin_lock_irq(&pdx->charInLock);
@@ -439,7 +439,7 @@ int GetChar(DEVICE_EXTENSION *pdx)
		iReturn = U14ERR_NOIN;	/*  no input data to read */
	spin_unlock_irq(&pdx->charInLock);

	Allowi(pdx);	/*  Make sure char reads are running */
	ced_allowi(pdx);	/*  Make sure char reads are running */

	mutex_unlock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */
	return iReturn;
@@ -464,7 +464,7 @@ int GetString(DEVICE_EXTENSION *pdx, char __user *pUser, int n)
		return -ENOMEM;

	mutex_lock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */
	Allowi(pdx);	/*  Make sure char reads are running */
	ced_allowi(pdx);	/*  Make sure char reads are running */
	ced_send_chars(pdx);		/*  and send any buffered chars */

	spin_lock_irq(&pdx->charInLock);
@@ -507,7 +507,7 @@ int GetString(DEVICE_EXTENSION *pdx, char __user *pUser, int n)
	} else
		spin_unlock_irq(&pdx->charInLock);

	Allowi(pdx);	/*  Make sure char reads are running */
	ced_allowi(pdx);	/*  Make sure char reads are running */
	mutex_unlock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */

	return iReturn;
@@ -520,7 +520,7 @@ int Stat1401(DEVICE_EXTENSION *pdx)
{
	int iReturn;
	mutex_lock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */
	Allowi(pdx);		/*  make sure we allow pending chars */
	ced_allowi(pdx);		/*  make sure we allow pending chars */
	ced_send_chars(pdx);		/*  in both directions */
	iReturn = pdx->dwNumInput;	/*  no lock as single read */
	mutex_unlock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */
@@ -539,7 +539,7 @@ int LineCount(DEVICE_EXTENSION *pdx)
	int iReturn = 0;	/*  will be count of line ends */

	mutex_lock(&pdx->io_mutex);	/*  Protect disconnect from new i/o */
	Allowi(pdx);		/*  Make sure char reads are running */
	ced_allowi(pdx);		/*  Make sure char reads are running */
	ced_send_chars(pdx);		/*  and send any buffered chars */
	spin_lock_irq(&pdx->charInLock);	/*  Get protection */

+5 −5
Original line number Diff line number Diff line
@@ -681,10 +681,10 @@ static void staged_callback(struct urb *pUrb)
	spin_unlock(&pdx->stagedLock);	/*  Finally release the lock again */

	/*  This is not correct as dwDMAFlag is protected by the staged lock, but it is treated */
	/*  in Allowi as if it were protected by the char lock. In any case, most systems will */
	/*  in ced_allowi as if it were protected by the char lock. In any case, most systems will */
	/*  not be upset by char input during DMA... sigh. Needs sorting out. */
	if (bRestartCharInput)	/*  may be out of date, but... */
		Allowi(pdx);	/*  ...Allowi tests a lock too. */
		ced_allowi(pdx);	/*  ...ced_allowi tests a lock too. */
	dev_dbg(&pdx->interface->dev, "%s: done\n", __func__);
}

@@ -1148,17 +1148,17 @@ static void ced_readchar_callback(struct urb *pUrb)
	pdx->bReadCharsPending = false;	/*  No longer have a pending read */
	spin_unlock(&pdx->charInLock);	/*  already at irq level */

	Allowi(pdx);	/*  see if we can do the next one */
	ced_allowi(pdx);	/*  see if we can do the next one */
}

/****************************************************************************
** Allowi
** ced_allowi
**
** This is used to make sure that there is always a pending input transfer so
** we can pick up any inward transfers. This can be called in multiple contexts
** so we use the irqsave version of the spinlock.
****************************************************************************/
int Allowi(DEVICE_EXTENSION *pdx)
int ced_allowi(DEVICE_EXTENSION *pdx)
{
	int iReturn = U14ERR_NOERROR;
	unsigned long flags;
+1 −1
Original line number Diff line number Diff line
@@ -201,7 +201,7 @@ typedef struct _DEVICE_EXTENSION {

/*  Definitions of routimes used between compilation object files */
/*  in usb1401.c */
extern int Allowi(DEVICE_EXTENSION *pdx);
extern int ced_allowi(DEVICE_EXTENSION *pdx);
extern int ced_send_chars(DEVICE_EXTENSION *pdx);
extern void ced_draw_down(DEVICE_EXTENSION *pdx);
extern int ced_read_write_mem(DEVICE_EXTENSION *pdx, bool Read, unsigned short wIdent,