Commit e8355aa3 authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

Staging: bcm: Remove typedef for _USB_TCB and call directly.

This patch removes typedef for
_USB_TCB, changes the name of the
struct to bcm_usb_tcb. In addition,
any calls to typedefs USB_TCB, or
*PUSB_TCB are changed to call the
struct directly.
Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 71dd092f
...@@ -34,11 +34,11 @@ typedef struct _INTR_ENDP_OUT { ...@@ -34,11 +34,11 @@ typedef struct _INTR_ENDP_OUT {
unsigned int int_out_pipe; unsigned int int_out_pipe;
} INTR_ENDP_OUT, *PINTR_ENDP_OUT; } INTR_ENDP_OUT, *PINTR_ENDP_OUT;
typedef struct _USB_TCB { struct bcm_usb_tcb {
struct urb *urb; struct urb *urb;
void *psIntfAdapter; void *psIntfAdapter;
bool bUsed; bool bUsed;
} USB_TCB, *PUSB_TCB; };
struct bcm_usb_rcb { struct bcm_usb_rcb {
struct urb *urb; struct urb *urb;
...@@ -63,7 +63,7 @@ struct bcm_interface_adapter { ...@@ -63,7 +63,7 @@ struct bcm_interface_adapter {
INTR_ENDP_OUT sIntrOut; INTR_ENDP_OUT sIntrOut;
ULONG ulInterruptData[2]; ULONG ulInterruptData[2];
struct urb *psInterruptUrb; struct urb *psInterruptUrb;
USB_TCB asUsbTcb[MAXIMUM_USB_TCB]; struct bcm_usb_tcb asUsbTcb[MAXIMUM_USB_TCB];
struct bcm_usb_rcb asUsbRcb[MAXIMUM_USB_RCB]; struct bcm_usb_rcb asUsbRcb[MAXIMUM_USB_RCB];
atomic_t uNumTcbUsed; atomic_t uNumTcbUsed;
atomic_t uCurrTcb; atomic_t uCurrTcb;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/*this is transmit call-back(BULK OUT)*/ /*this is transmit call-back(BULK OUT)*/
static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/) static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
{ {
PUSB_TCB pTcb= (PUSB_TCB)urb->context; struct bcm_usb_tcb *pTcb= (struct bcm_usb_tcb *)urb->context;
struct bcm_interface_adapter *psIntfAdapter = pTcb->psIntfAdapter; struct bcm_interface_adapter *psIntfAdapter = pTcb->psIntfAdapter;
struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer; struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer;
struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ; struct bcm_mini_adapter *psAdapter = psIntfAdapter->psAdapter ;
...@@ -107,9 +107,9 @@ err_exit : ...@@ -107,9 +107,9 @@ err_exit :
} }
static PUSB_TCB GetBulkOutTcb(struct bcm_interface_adapter *psIntfAdapter) static struct bcm_usb_tcb *GetBulkOutTcb(struct bcm_interface_adapter *psIntfAdapter)
{ {
PUSB_TCB pTcb = NULL; struct bcm_usb_tcb *pTcb = NULL;
UINT index = 0; UINT index = 0;
if((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) && if((atomic_read(&psIntfAdapter->uNumTcbUsed) < MAXIMUM_USB_TCB) &&
...@@ -128,7 +128,7 @@ static PUSB_TCB GetBulkOutTcb(struct bcm_interface_adapter *psIntfAdapter) ...@@ -128,7 +128,7 @@ static PUSB_TCB GetBulkOutTcb(struct bcm_interface_adapter *psIntfAdapter)
return pTcb; return pTcb;
} }
static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, PUSB_TCB pTcb, PVOID data, int len) static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, struct bcm_usb_tcb *pTcb, PVOID data, int len)
{ {
struct urb *urb = pTcb->urb; struct urb *urb = pTcb->urb;
...@@ -182,7 +182,7 @@ static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, PUSB_TCB pTc ...@@ -182,7 +182,7 @@ static int TransmitTcb(struct bcm_interface_adapter *psIntfAdapter, PUSB_TCB pTc
int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len) int InterfaceTransmitPacket(PVOID arg, PVOID data, UINT len)
{ {
PUSB_TCB pTcb= NULL; struct bcm_usb_tcb *pTcb= NULL;
struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg; struct bcm_interface_adapter *psIntfAdapter = (struct bcm_interface_adapter *)arg;
pTcb= GetBulkOutTcb(psIntfAdapter); pTcb= GetBulkOutTcb(psIntfAdapter);
......
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