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

staging: vt6656: clean up PIPEnsSendBulkOut.

Remove commented out code, white space and camel case.

camel case changes
pDevice -> priv
pContext -> context
pUrb -> urb
Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent da5c99fd
...@@ -528,49 +528,40 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb) ...@@ -528,49 +528,40 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
* *
*/ */
int PIPEnsSendBulkOut(struct vnt_private *pDevice, int PIPEnsSendBulkOut(struct vnt_private *priv,
struct vnt_usb_send_context *pContext) struct vnt_usb_send_context *context)
{ {
int status; int status;
struct urb *pUrb; struct urb *urb;
pDevice->bPWBitOn = false; priv->bPWBitOn = false;
/*
if (pDevice->pPendingBulkOutContext != NULL) {
pDevice->NumContextsQueued++;
EnqueueContext(pDevice->FirstTxContextQueue, pDevice->LastTxContextQueue, pContext);
status = STATUS_PENDING;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send pending!\n");
return status;
}
*/
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsSendBulkOut\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_nsSendBulkOut\n");
if (!(MP_IS_READY(pDevice) && pDevice->Flags & fMP_POST_WRITES)) { if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
pContext->bBoolInUse = false; context->bBoolInUse = false;
return STATUS_RESOURCES; return STATUS_RESOURCES;
} }
pUrb = pContext->pUrb; urb = context->pUrb;
pDevice->ulBulkOutPosted++; priv->ulBulkOutPosted++;
// pDevice->pPendingBulkOutContext = pContext;
usb_fill_bulk_urb(pUrb, usb_fill_bulk_urb(urb,
pDevice->usb, priv->usb,
usb_sndbulkpipe(pDevice->usb, 3), usb_sndbulkpipe(priv->usb, 3),
pContext->Data, context->Data,
pContext->uBufLen, context->uBufLen,
s_nsBulkOutIoCompleteWrite, s_nsBulkOutIoCompleteWrite,
pContext); context);
status = usb_submit_urb(pUrb, GFP_ATOMIC); status = usb_submit_urb(urb, GFP_ATOMIC);
if (status != 0) if (status != 0) {
{ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Tx URB failed %d\n", status); "Submit Tx URB failed %d\n", status);
pContext->bBoolInUse = false; context->bBoolInUse = false;
return STATUS_FAILURE; return STATUS_FAILURE;
} }
return STATUS_PENDING; return STATUS_PENDING;
} }
......
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