Commit d4fa2ab0 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman

staging: vt6656: clean up s_nsBulkInUsbIoCompleteRead

Clean up white space and camel case.

Camel case changes
pDevice -> priv
pRCB -> rcb
bReAllocSkb -> re_alloc_skb
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 67638980
...@@ -467,16 +467,16 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB) ...@@ -467,16 +467,16 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB)
static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
{ {
struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context; struct vnt_rcb *rcb = (struct vnt_rcb *)urb->context;
struct vnt_private *pDevice = pRCB->pDevice; struct vnt_private *priv = rcb->pDevice;
int bReAllocSkb = false; int re_alloc_skb = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
switch (urb->status) { switch (urb->status) {
case 0: case 0:
pDevice->ulBulkInContCRCError = 0; priv->ulBulkInContCRCError = 0;
pDevice->ulBulkInBytesRead += urb->actual_length; priv->ulBulkInBytesRead += urb->actual_length;
break; break;
case -ECONNRESET: case -ECONNRESET:
case -ENOENT: case -ENOENT:
...@@ -484,25 +484,30 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) ...@@ -484,25 +484,30 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
return; return;
case -ETIMEDOUT: case -ETIMEDOUT:
default: default:
pDevice->ulBulkInError++; priv->ulBulkInError++;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
"BULK In failed %d\n", urb->status); "BULK In failed %d\n", urb->status);
break; break;
} }
if (urb->actual_length) { if (urb->actual_length) {
spin_lock(&pDevice->lock); spin_lock(&priv->lock);
if (RXbBulkInProcessData(pDevice, pRCB, urb->actual_length) == true)
bReAllocSkb = true; if (RXbBulkInProcessData(priv, rcb, urb->actual_length) == true)
spin_unlock(&pDevice->lock); re_alloc_skb = true;
spin_unlock(&priv->lock);
} }
pRCB->Ref--;
if (pRCB->Ref == 0) rcb->Ref--;
{ if (rcb->Ref == 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d \n",pDevice->NumRecvFreeList); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeNormal %d\n",
spin_lock(&pDevice->lock); priv->NumRecvFreeList);
RXvFreeRCB(pRCB, bReAllocSkb); spin_lock(&priv->lock);
spin_unlock(&pDevice->lock);
RXvFreeRCB(rcb, re_alloc_skb);
spin_unlock(&priv->lock);
} }
return; return;
......
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