staging: emxx_udc: Remove unecessary temporary variable
This improves code readability. Signed-off-by: Afonso Bordado <afonsobordado@az8.co> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
86e2ba1c45
commit
7e026bfabb
1 changed files with 7 additions and 9 deletions
|
@ -556,21 +556,19 @@ static void _nbu2ss_dma_unmap_single(
|
||||||
static int ep0_out_pio(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
|
static int ep0_out_pio(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
|
||||||
{
|
{
|
||||||
u32 i;
|
u32 i;
|
||||||
int nret = 0;
|
|
||||||
u32 numreads = length / sizeof(u32);
|
u32 numreads = length / sizeof(u32);
|
||||||
union usb_reg_access *pBuf32 = (union usb_reg_access *)pBuf;
|
union usb_reg_access *pBuf32 = (union usb_reg_access *)pBuf;
|
||||||
|
|
||||||
/*------------------------------------------------------------*/
|
if (!numreads)
|
||||||
|
return 0;
|
||||||
|
|
||||||
/* PIO Read */
|
/* PIO Read */
|
||||||
if (numreads) {
|
for (i = 0; i < numreads; i++) {
|
||||||
for (i = 0; i < numreads; i++) {
|
pBuf32->dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
|
||||||
pBuf32->dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
|
pBuf32++;
|
||||||
pBuf32++;
|
|
||||||
}
|
|
||||||
nret = numreads * sizeof(u32);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nret;
|
return numreads * sizeof(u32);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-------------------------------------------------------------------------*/
|
/*-------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in a new issue