mirror of https://gitee.com/openkylin/linux.git
staging: vt6656: Cleanup PIPEnsBulkInUsbRead
Remove camel case and white space. Camel case changes pDevice -> priv pRCB -> rcb ntStatus -> status pUrb -> urb Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d4fa2ab067
commit
0b787d713b
|
@ -409,45 +409,43 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB)
|
int PIPEnsBulkInUsbRead(struct vnt_private *priv, struct vnt_rcb *rcb)
|
||||||
{
|
{
|
||||||
int ntStatus = 0;
|
int status = 0;
|
||||||
struct urb *pUrb;
|
struct urb *urb;
|
||||||
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsStartBulkInUsbRead\n");
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsStartBulkInUsbRead\n");
|
||||||
|
|
||||||
if (pDevice->Flags & fMP_DISCONNECTED)
|
if (priv->Flags & fMP_DISCONNECTED)
|
||||||
return STATUS_FAILURE;
|
return STATUS_FAILURE;
|
||||||
|
|
||||||
pDevice->ulBulkInPosted++;
|
priv->ulBulkInPosted++;
|
||||||
|
|
||||||
pUrb = pRCB->pUrb;
|
urb = rcb->pUrb;
|
||||||
//
|
if (rcb->skb == NULL) {
|
||||||
// Now that we have created the urb, we will send a
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rcb->skb is null\n");
|
||||||
// request to the USB device object.
|
return status;
|
||||||
//
|
}
|
||||||
if (pRCB->skb == NULL) {
|
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pRCB->skb is null \n");
|
|
||||||
return ntStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
usb_fill_bulk_urb(pUrb,
|
usb_fill_bulk_urb(urb,
|
||||||
pDevice->usb,
|
priv->usb,
|
||||||
usb_rcvbulkpipe(pDevice->usb, 2),
|
usb_rcvbulkpipe(priv->usb, 2),
|
||||||
(void *) (pRCB->skb->data),
|
(void *) (rcb->skb->data),
|
||||||
MAX_TOTAL_SIZE_WITH_ALL_HEADERS,
|
MAX_TOTAL_SIZE_WITH_ALL_HEADERS,
|
||||||
s_nsBulkInUsbIoCompleteRead,
|
s_nsBulkInUsbIoCompleteRead,
|
||||||
pRCB);
|
rcb);
|
||||||
|
|
||||||
ntStatus = usb_submit_urb(pUrb, GFP_ATOMIC);
|
status = usb_submit_urb(urb, GFP_ATOMIC);
|
||||||
if (ntStatus != 0) {
|
if (status != 0) {
|
||||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Submit Rx URB failed %d\n", ntStatus);
|
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||||
|
"Submit Rx URB failed %d\n", status);
|
||||||
return STATUS_FAILURE ;
|
return STATUS_FAILURE ;
|
||||||
}
|
}
|
||||||
pRCB->Ref = 1;
|
|
||||||
pRCB->bBoolInUse= true;
|
|
||||||
|
|
||||||
return ntStatus;
|
rcb->Ref = 1;
|
||||||
|
rcb->bBoolInUse = true;
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue