summaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656
diff options
context:
space:
mode:
authorMalcolm Priestley2014-02-25 21:51:47 +0100
committerGreg Kroah-Hartman2014-02-27 22:04:36 +0100
commit1882c19c2d5aacc839fc3b78cf0becb5409d7bbb (patch)
treecf15a352051316657ab885198425db3d0f6a9906 /drivers/staging/vt6656
parentstaging: vt6656: s_nsBulkInUsbIoCompleteRead get rid of status. (diff)
downloadkernel-qcow2-linux-1882c19c2d5aacc839fc3b78cf0becb5409d7bbb.tar.gz
kernel-qcow2-linux-1882c19c2d5aacc839fc3b78cf0becb5409d7bbb.tar.xz
kernel-qcow2-linux-1882c19c2d5aacc839fc3b78cf0becb5409d7bbb.zip
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>
Diffstat (limited to 'drivers/staging/vt6656')
-rw-r--r--drivers/staging/vt6656/usbpipe.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 2f8e8e6153fe..87601b7b984c 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -469,14 +469,10 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
{
struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context;
struct vnt_private *pDevice = pRCB->pDevice;
- unsigned long bytesRead;
- int bIndicateReceive = false;
int bReAllocSkb = false;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsBulkInUsbIoCompleteRead\n");
- bytesRead = urb->actual_length;
-
if (urb->status) {
pDevice->ulBulkInError++;
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);
// }
} else {
- if (bytesRead)
- bIndicateReceive = true;
pDevice->ulBulkInContCRCError = 0;
- pDevice->ulBulkInBytesRead += bytesRead;
+ pDevice->ulBulkInBytesRead += urb->actual_length;
}
- if (bIndicateReceive) {
+ if (urb->actual_length) {
spin_lock(&pDevice->lock);
- if (RXbBulkInProcessData(pDevice, pRCB, bytesRead) == true)
+ if (RXbBulkInProcessData(pDevice, pRCB, urb->actual_length) == true)
bReAllocSkb = true;
spin_unlock(&pDevice->lock);
}