staging: vt6656: s_nsBulkInUsbIoCompleteRead Remove bytesRead/bIndicateReceive.

Replace with urb->actual_length.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Malcolm Priestley 2014-02-25 20:51:47 +00:00 committed by Greg Kroah-Hartman
parent e3a8fa1748
commit 1882c19c2d
1 changed files with 3 additions and 9 deletions

View File

@ -469,14 +469,10 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
{ {
struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context; struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context;
struct vnt_private *pDevice = pRCB->pDevice; struct vnt_private *pDevice = pRCB->pDevice;
unsigned long bytesRead;
int bIndicateReceive = false;
int bReAllocSkb = false; int bReAllocSkb = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
bytesRead = urb->actual_length;
if (urb->status) { if (urb->status) {
pDevice->ulBulkInError++; pDevice->ulBulkInError++;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK In failed %d\n", urb->status); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BULK In failed %d\n", urb->status);
@ -489,15 +485,13 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
// MP_SET_FLAG(pDevice, fMP_DISCONNECTED); // MP_SET_FLAG(pDevice, fMP_DISCONNECTED);
// } // }
} else { } else {
if (bytesRead)
bIndicateReceive = true;
pDevice->ulBulkInContCRCError = 0; pDevice->ulBulkInContCRCError = 0;
pDevice->ulBulkInBytesRead += bytesRead; pDevice->ulBulkInBytesRead += urb->actual_length;
} }
if (bIndicateReceive) { if (urb->actual_length) {
spin_lock(&pDevice->lock); spin_lock(&pDevice->lock);
if (RXbBulkInProcessData(pDevice, pRCB, bytesRead) == true) if (RXbBulkInProcessData(pDevice, pRCB, urb->actual_length) == true)
bReAllocSkb = true; bReAllocSkb = true;
spin_unlock(&pDevice->lock); spin_unlock(&pDevice->lock);
} }