Staging: bcm: Remove typedef for link_request and call directly.
authorKevin McKinney <klmckinney1@gmail.com>
Sat, 26 May 2012 16:05:08 +0000 (12:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Jun 2012 04:09:21 +0000 (21:09 -0700)
This patch removes typedef for link_request, changes the
name of the struct from link_request to bcm_link_request.
In addition, any calls to the following typedefs
"LINK_REQUEST, *PLINK_REQUEST, *CONTROL_MESSAGE"
are changed to call the struct directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/Adapter.h
drivers/staging/bcm/Bcmchar.c
drivers/staging/bcm/InterfaceTx.c
drivers/staging/bcm/Misc.c

index 5256e3f2bcc31f13193a3dcad96366ae25f9ed9e..a36767d9c551ba352a7f282f3c91baf03585adb3 100644 (file)
@@ -28,11 +28,10 @@ struct _CONTROL_PACKET {
 } __packed;
 typedef struct _CONTROL_PACKET CONTROL_PACKET, *PCONTROL_PACKET;
 
-struct link_request {
+struct bcm_link_request {
        LEADER  Leader;
        UCHAR   szData[4];
 } __packed;
-typedef struct link_request LINK_REQUEST, *PLINK_REQUEST;
 
 #define MAX_IP_RANGE_LENGTH 4
 #define MAX_PORT_RANGE 4
@@ -417,8 +416,6 @@ struct bcm_firmware_info {
 /* holds the value of net_device structure.. */
 extern struct net_device *gblpnetdev;
 
-typedef LINK_REQUEST CONTROL_MESSAGE;
-
 struct bcm_ddr_setting {
        UINT ulRegAddress;
        UINT ulRegValue;
index 8d4052a7deae4b480b2ee65e3b1b01428fecddbb..d1dc0c3852abcd975f72fc04f45791cedf4a23ad 100644 (file)
@@ -722,7 +722,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
                if (copy_from_user(&IoBuffer, argp, sizeof(IOCTL_BUFFER)))
                        return -EFAULT;
 
-               if (IoBuffer.InputLength < sizeof(struct link_request))
+               if (IoBuffer.InputLength < sizeof(struct bcm_link_request))
                        return -EINVAL;
 
                if (IoBuffer.InputLength > MAX_CNTL_PKT_SIZE)
index a842de9de6b596d4e508233f5d3ec3d553179d7c..3012f29cf85c3247f54511210e59c2391288549d 100644 (file)
@@ -5,7 +5,7 @@ static void write_bulk_callback(struct urb *urb/*, struct pt_regs *regs*/)
 {
        PUSB_TCB pTcb= (PUSB_TCB)urb->context;
        PS_INTERFACE_ADAPTER psIntfAdapter = pTcb->psIntfAdapter;
-       CONTROL_MESSAGE *pControlMsg = (CONTROL_MESSAGE *)urb->transfer_buffer;
+       struct bcm_link_request *pControlMsg = (struct bcm_link_request *)urb->transfer_buffer;
        PMINI_ADAPTER psAdapter = psIntfAdapter->psAdapter ;
        BOOLEAN bpowerDownMsg = FALSE ;
     PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
index b2d90d1e26af75d416bb27b6f89a66f5f3085527..954c3adf79446dc219bce90ed85a6b76f88c3308 100644 (file)
@@ -237,7 +237,7 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
        INT Status = 0;
        unsigned char *ctrl_buff = NULL;
        UINT pktlen = 0;
-       PLINK_REQUEST pLinkReq = NULL;
+       struct bcm_link_request *pLinkReq = NULL;
        PUCHAR pucAddIndication = NULL;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "======>");
@@ -246,7 +246,7 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
                return -EINVAL;
        }
 
-       pLinkReq = (PLINK_REQUEST)ioBuffer;
+       pLinkReq = (struct bcm_link_request *)ioBuffer;
        pLeader = (PLEADER)ioBuffer; /* ioBuffer Contains sw_Status and Payload */
 
        if (Adapter->bShutStatus == TRUE &&
@@ -414,7 +414,7 @@ INT CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID ioBuffer)
 *
 * Returns     - None.
 *****************************************************************/
-static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, PLINK_REQUEST pstStatisticsPtrRequest)
+static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, struct bcm_link_request *pstStatisticsPtrRequest)
 {
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "======>");
        pstStatisticsPtrRequest->Leader.Status = STATS_POINTER_REQ_STATUS;
@@ -438,10 +438,10 @@ static VOID SendStatisticsPointerRequest(PMINI_ADAPTER Adapter, PLINK_REQUEST ps
 *******************************************************************/
 VOID LinkMessage(PMINI_ADAPTER Adapter)
 {
-       PLINK_REQUEST pstLinkRequest = NULL;
+       struct bcm_link_request *pstLinkRequest = NULL;
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>");
        if (Adapter->LinkStatus == SYNC_UP_REQUEST && Adapter->AutoSyncup) {
-               pstLinkRequest = kzalloc(sizeof(LINK_REQUEST), GFP_ATOMIC);
+               pstLinkRequest = kzalloc(sizeof(struct bcm_link_request), GFP_ATOMIC);
                if (!pstLinkRequest) {
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "Can not allocate memory for Link request!");
                        return;
@@ -456,7 +456,7 @@ VOID LinkMessage(PMINI_ADAPTER Adapter)
                Adapter->bSyncUpRequestSent = TRUE;
 
        } else if (Adapter->LinkStatus == PHY_SYNC_ACHIVED && Adapter->AutoLinkUp) {
-               pstLinkRequest = kzalloc(sizeof(LINK_REQUEST), GFP_ATOMIC);
+               pstLinkRequest = kzalloc(sizeof(struct bcm_link_request), GFP_ATOMIC);
                if (!pstLinkRequest) {
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "Can not allocate memory for Link request!");
                        return;
@@ -584,7 +584,7 @@ void SendIdleModeResponse(PMINI_ADAPTER Adapter)
 {
        INT status = 0, NVMAccess = 0, lowPwrAbortMsg = 0;
        struct timeval tv;
-       CONTROL_MESSAGE stIdleResponse = {{0} };
+       struct bcm_link_request stIdleResponse = {{0} };
        memset(&tv, 0, sizeof(tv));
        stIdleResponse.Leader.Status = IDLE_MESSAGE;
        stIdleResponse.Leader.PLength = IDLE_MODE_PAYLOAD_LENGTH;
@@ -1392,11 +1392,11 @@ static VOID HandleShutDownModeWakeup(PMINI_ADAPTER Adapter)
 
 static VOID SendShutModeResponse(PMINI_ADAPTER Adapter)
 {
-       CONTROL_MESSAGE stShutdownResponse;
+       struct bcm_link_request stShutdownResponse;
        UINT NVMAccess = 0, lowPwrAbortMsg = 0;
        UINT Status = 0;
 
-       memset(&stShutdownResponse, 0, sizeof(CONTROL_MESSAGE));
+       memset(&stShutdownResponse, 0, sizeof(struct bcm_link_request));
        stShutdownResponse.Leader.Status  = LINK_UP_CONTROL_REQ;
        stShutdownResponse.Leader.PLength = 8; /* 8 bytes; */
        stShutdownResponse.szData[0] = LINK_UP_ACK;