diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-28 09:44:56 -0700 |
commit | e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch) | |
tree | ea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /drivers/staging/vt6656/usbpipe.c | |
parent | 81280572ca6f54009edfa4deee563e8678784218 (diff) | |
parent | a4ac0d847af9dd34d5953a5e264400326144b6b2 (diff) | |
download | op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.zip op-kernel-dev-e4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7.tar.gz |
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves
some conflicts that were present due to changes in other trees that were
affected by files here.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/vt6656/usbpipe.c')
-rw-r--r-- | drivers/staging/vt6656/usbpipe.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c index a32785c..c612ab5 100644 --- a/drivers/staging/vt6656/usbpipe.c +++ b/drivers/staging/vt6656/usbpipe.c @@ -118,13 +118,11 @@ int PIPEnsControlOutAsyn( { int ntStatus; - if (MP_TEST_FLAG(pDevice, fMP_DISCONNECTED)) + if (pDevice->Flags & fMP_DISCONNECTED) return STATUS_FAILURE; - - if (MP_TEST_FLAG(pDevice, fMP_CONTROL_WRITES)) { + if (pDevice->Flags & fMP_CONTROL_WRITES) return STATUS_FAILURE; - } if (in_interrupt()) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"in_interrupt return ..byRequest %x\n", byRequest); @@ -164,12 +162,11 @@ int PIPEnsControlOut( int ntStatus = 0; int ii; - if (MP_TEST_FLAG(pDevice, fMP_DISCONNECTED)) + if (pDevice->Flags & fMP_DISCONNECTED) return STATUS_FAILURE; - if (MP_TEST_FLAG(pDevice, fMP_CONTROL_WRITES)) { + if (pDevice->Flags & fMP_CONTROL_WRITES) return STATUS_FAILURE; - } pDevice->sUsbCtlRequest.bRequestType = 0x40; pDevice->sUsbCtlRequest.bRequest = byRequest; @@ -193,12 +190,15 @@ int PIPEnsControlOut( } spin_unlock_irq(&pDevice->lock); for (ii = 0; ii <= USB_CTL_WAIT; ii ++) { - if (MP_TEST_FLAG(pDevice, fMP_CONTROL_WRITES)) - mdelay(1); + + if (pDevice->Flags & fMP_CONTROL_WRITES) + mdelay(1); else - break; + break; + if (ii >= USB_CTL_WAIT) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control send request submission timeout \n"); + DBG_PRT(MSG_LEVEL_DEBUG, + KERN_INFO "control send request submission timeout\n"); spin_lock_irq(&pDevice->lock); MP_CLEAR_FLAG(pDevice, fMP_CONTROL_WRITES); return STATUS_FAILURE; @@ -221,12 +221,12 @@ int PIPEnsControlIn( int ntStatus = 0; int ii; - if (MP_TEST_FLAG(pDevice, fMP_DISCONNECTED)) + if (pDevice->Flags & fMP_DISCONNECTED) return STATUS_FAILURE; - if (MP_TEST_FLAG(pDevice, fMP_CONTROL_READS)) { - return STATUS_FAILURE; - } + if (pDevice->Flags & fMP_CONTROL_READS) + return STATUS_FAILURE; + pDevice->sUsbCtlRequest.bRequestType = 0xC0; pDevice->sUsbCtlRequest.bRequest = byRequest; pDevice->sUsbCtlRequest.wValue = cpu_to_le16p(&wValue); @@ -247,13 +247,15 @@ int PIPEnsControlIn( spin_unlock_irq(&pDevice->lock); for (ii = 0; ii <= USB_CTL_WAIT; ii ++) { - if (MP_TEST_FLAG(pDevice, fMP_CONTROL_READS)) - mdelay(1); - else { - break; - } - if (ii >= USB_CTL_WAIT) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"control rcv request submission timeout \n"); + + if (pDevice->Flags & fMP_CONTROL_READS) + mdelay(1); + else + break; + + if (ii >= USB_CTL_WAIT) { + DBG_PRT(MSG_LEVEL_DEBUG, + KERN_INFO "control rcv request submission timeout\n"); spin_lock_irq(&pDevice->lock); MP_CLEAR_FLAG(pDevice, fMP_CONTROL_READS); return STATUS_FAILURE; @@ -492,7 +494,7 @@ int PIPEnsBulkInUsbRead(PSDevice pDevice, PRCB pRCB) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsStartBulkInUsbRead\n"); - if (MP_TEST_FLAG(pDevice, fMP_DISCONNECTED)) + if (pDevice->Flags & fMP_DISCONNECTED) return STATUS_FAILURE; pDevice->ulBulkInPosted++; @@ -618,7 +620,7 @@ s_nsBulkInUsbIoCompleteRead( * Return Value: STATUS_INSUFFICIENT_RESOURCES or result of IoCallDriver * */ -NDIS_STATUS +int PIPEnsSendBulkOut( PSDevice pDevice, PUSB_SEND_CONTEXT pContext @@ -643,7 +645,7 @@ PIPEnsSendBulkOut( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsSendBulkOut\n"); - if(MP_IS_READY(pDevice) && MP_TEST_FLAG(pDevice, fMP_POST_WRITES)) { + if (MP_IS_READY(pDevice) && (pDevice->Flags & fMP_POST_WRITES)) { pUrb = pContext->pUrb; pDevice->ulBulkOutPosted++; |