Use the normal types.

Remove now unused typedef.
Remove unnecessary casts to (unsigned char *).

Signed-off-by: Joe Perches <[email protected]>
---
 drivers/staging/bcm/Bcmchar.c            |    8 ++--
 drivers/staging/bcm/CmHost.c             |   24 ++++----
 drivers/staging/bcm/InterfaceDld.c       |   10 ++--
 drivers/staging/bcm/InterfaceInit.c      |   34 ++++++------
 drivers/staging/bcm/InterfaceRx.c        |    2 +-
 drivers/staging/bcm/Misc.c               |   20 ++++----
 drivers/staging/bcm/PHSModule.c          |   14 +++---
 drivers/staging/bcm/PHSModule.h          |    2 +-
 drivers/staging/bcm/Prototypes.h         |    4 +-
 drivers/staging/bcm/Qos.c                |   10 ++--
 drivers/staging/bcm/Typedefs.h           |    1 -
 drivers/staging/bcm/led_control.c        |    6 +-
 drivers/staging/bcm/nvm.c                |   84 +++++++++++++++---------------
 drivers/staging/bcm/nvm.h                |    2 +-
 drivers/staging/bcm/vendorspecificextn.c |    6 +-
 drivers/staging/bcm/vendorspecificextn.h |    6 +-
 16 files changed, 116 insertions(+), 117 deletions(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 3b400da..b6ffe2d 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -1288,7 +1288,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
        case IOCTL_BCM_NVM_READ:
        case IOCTL_BCM_NVM_WRITE: {
                NVM_READWRITE  stNVMReadWrite;
-               PUCHAR pReadData = NULL;
+               unsigned char *pReadData = NULL;
                ULONG ulDSDMagicNumInUsrBuff = 0;
                struct timeval tv0, tv1;
                memset(&tv0, 0, sizeof(struct timeval));
@@ -1443,7 +1443,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
 
        case IOCTL_BCM_FLASH2X_SECTION_READ: {
                FLASH2X_READWRITE sFlash2xRead = {0};
-               PUCHAR pReadBuff = NULL ;
+               unsigned char *pReadBuff = NULL;
                UINT NOB = 0;
                UINT BuffSize = 0;
                UINT ReadBytes = 0;
@@ -1545,7 +1545,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
 
        case IOCTL_BCM_FLASH2X_SECTION_WRITE: {
                FLASH2X_READWRITE sFlash2xWrite = {0};
-               PUCHAR pWriteBuff;
+               unsigned char *pWriteBuff;
                void __user *InputAddr;
                UINT NOB = 0;
                UINT BuffSize = 0;
@@ -1928,7 +1928,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
                int BuffSize;
                int ReadOffset = 0;
                UINT ReadBytes = 0 ;
-               PUCHAR pReadBuff;
+               unsigned char *pReadBuff;
                void __user *OutPutBuff;
 
                if (Adapter->eNVMType != NVM_FLASH) {
diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index fdcac0c..a46c118 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1773,7 +1773,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)
 
 }
 
-static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG 
ulAddrSFParamSet, PUCHAR pucDestBuffer)
+static inline ULONG RestoreSFParam(PMINI_ADAPTER Adapter, ULONG 
ulAddrSFParamSet, unsigned char *pucDestBuffer)
 {
        UINT  nBytesToRead = sizeof(stServiceFlowParamSI);
 
@@ -1785,14 +1785,14 @@ static inline ULONG RestoreSFParam(PMINI_ADAPTER 
Adapter, ULONG ulAddrSFParamSet
        ulAddrSFParamSet = ntohl(ulAddrSFParamSet);
 
        //Read out the SF Param Set At the indicated Location
-       if (rdm(Adapter, ulAddrSFParamSet, (PUCHAR)pucDestBuffer, nBytesToRead) 
< 0)
+       if (rdm(Adapter, ulAddrSFParamSet, pucDestBuffer, nBytesToRead) < 0)
                return STATUS_FAILURE;
 
        return 1;
 }
 
 
-static ULONG StoreSFParam(PMINI_ADAPTER Adapter, PUCHAR pucSrcBuffer, ULONG  
ulAddrSFParamSet)
+static ULONG StoreSFParam(PMINI_ADAPTER Adapter, unsigned char *pucSrcBuffer, 
ULONG  ulAddrSFParamSet)
 {
        UINT    nBytesToWrite = sizeof(stServiceFlowParamSI);
        int ret = 0;
@@ -1855,7 +1855,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER 
Adapter, PVOID pvBuffer, UINT
        if (!pstAddIndication->psfAuthorizedSet)
                return 0;
 
-       if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfAuthorizedSet,
+       if (StoreSFParam(Adapter, (unsigned char 
*)&pstAddIndicationAlt->sfAuthorizedSet,
                        (ULONG)pstAddIndication->psfAuthorizedSet)!= 1)
                return 0;
 
@@ -1892,7 +1892,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER 
Adapter, PVOID pvBuffer, UINT
                GetNextTargetBufferLocation(Adapter, 
pstAddIndicationAlt->u16TID);
        if (!pstAddIndication->psfAdmittedSet)
                return 0;
-       if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfAdmittedSet, 
(ULONG)pstAddIndication->psfAdmittedSet) != 1)
+       if (StoreSFParam(Adapter, (unsigned char 
*)&pstAddIndicationAlt->sfAdmittedSet, (ULONG)pstAddIndication->psfAdmittedSet) 
!= 1)
                return 0;
 
        pstAddIndication->psfAdmittedSet = (stServiceFlowParamSI 
*)ntohl((ULONG)pstAddIndication->psfAdmittedSet);
@@ -1903,7 +1903,7 @@ ULONG StoreCmControlResponseMessage(PMINI_ADAPTER 
Adapter, PVOID pvBuffer, UINT
                GetNextTargetBufferLocation(Adapter, 
pstAddIndicationAlt->u16TID);
        if (!pstAddIndication->psfActiveSet)
                return 0;
-       if (StoreSFParam(Adapter, (PUCHAR)&pstAddIndicationAlt->sfActiveSet, 
(ULONG)pstAddIndication->psfActiveSet) != 1)
+       if (StoreSFParam(Adapter, (unsigned char 
*)&pstAddIndicationAlt->sfActiveSet, (ULONG)pstAddIndication->psfActiveSet) != 
1)
                return 0;
 
        pstAddIndication->psfActiveSet = (stServiceFlowParamSI 
*)ntohl((ULONG)pstAddIndication->psfActiveSet);
@@ -1976,7 +1976,7 @@ static inline stLocalSFAddIndicationAlt
        pstAddIndicationDest->u8CC = pstAddIndication->u8CC;
 
        bcm_dbg(Adapter, OTHERS, CONN_MSG, ALL, "Restoring Active Set\n");
-       ulStatus=RestoreSFParam(Adapter, (ULONG)pstAddIndication->psfActiveSet, 
(PUCHAR)&pstAddIndicationDest->sfActiveSet);
+       ulStatus=RestoreSFParam(Adapter, (ULONG)pstAddIndication->psfActiveSet, 
(unsigned char *)&pstAddIndicationDest->sfActiveSet);
        if (ulStatus != 1) {
                goto failed_restore_sf_param;
        }
@@ -1984,7 +1984,7 @@ static inline stLocalSFAddIndicationAlt
                pstAddIndicationDest->sfActiveSet.u8TotalClassifiers = 
MAX_CLASSIFIERS_IN_SF;
 
        bcm_dbg(Adapter, OTHERS, CONN_MSG, ALL, "Restoring Admitted Set\n");
-       ulStatus=RestoreSFParam(Adapter, 
(ULONG)pstAddIndication->psfAdmittedSet, 
(PUCHAR)&pstAddIndicationDest->sfAdmittedSet);
+       ulStatus=RestoreSFParam(Adapter, 
(ULONG)pstAddIndication->psfAdmittedSet, (unsigned char 
*)&pstAddIndicationDest->sfAdmittedSet);
        if (ulStatus != 1) {
                goto failed_restore_sf_param;
        }
@@ -1992,7 +1992,7 @@ static inline stLocalSFAddIndicationAlt
                pstAddIndicationDest->sfAdmittedSet.u8TotalClassifiers = 
MAX_CLASSIFIERS_IN_SF;
 
        bcm_dbg(Adapter, OTHERS, CONN_MSG, ALL, "Restoring Authorized Set\n");
-       ulStatus=RestoreSFParam(Adapter, 
(ULONG)pstAddIndication->psfAuthorizedSet, 
(PUCHAR)&pstAddIndicationDest->sfAuthorizedSet);
+       ulStatus=RestoreSFParam(Adapter, 
(ULONG)pstAddIndication->psfAuthorizedSet, (unsigned char 
*)&pstAddIndicationDest->sfAuthorizedSet);
        if (ulStatus != 1) {
                goto failed_restore_sf_param;
        }
@@ -2266,8 +2266,8 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter,  
/**<Pointer to the Adap
                                   Hence any access to the newly added SF 
through uiSearchRuleIndex is invalid.
                                   SHOULD BE STRICTLY AVOIDED.
                                */
-//                                     
*(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
-                               memcpy((((PUCHAR)pvBuffer)+1), 
&psfLocalSet->u32SFID, 4);
+//                                     *(PULONG)(((unsigned char 
*)pvBuffer)+1)=psfLocalSet->u32SFID;
+                               memcpy((((unsigned char *)pvBuffer)+1), 
&psfLocalSet->u32SFID, 4);
 
                                if (pstAddIndication->sfActiveSet.bValid == 
TRUE) {
                                        if (UPLINK_DIR == 
pstAddIndication->u8Direction) {
@@ -2368,7 +2368,7 @@ BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter,  
/**<Pointer to the Adap
                                CopyToAdapter(Adapter, psfLocalSet, 
uiSearchRuleIndex,
                                              DSC_ACK, pstAddIndication);
 
-                               
*(PULONG)(((PUCHAR)pvBuffer)+1)=psfLocalSet->u32SFID;
+                               *(PULONG)(((unsigned char 
*)pvBuffer)+1)=psfLocalSet->u32SFID;
                        } else if (pstChangeIndication->u8CC == 6) {
                                deleteSFBySfid(Adapter, uiSearchRuleIndex);
                                kfree(pstAddIndication);
diff --git a/drivers/staging/bcm/InterfaceDld.c 
b/drivers/staging/bcm/InterfaceDld.c
index 1534745..06218ab 100644
--- a/drivers/staging/bcm/InterfaceDld.c
+++ b/drivers/staging/bcm/InterfaceDld.c
@@ -214,7 +214,7 @@ static int bcm_download_config_file(PMINI_ADAPTER Adapter, 
FIRMWARE_INFO *psFwIn
                }
        }
 
-       retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams, 
sizeof(STARGETPARAMS), CONFIG_BEGIN_ADDR);
+       retval = buffDnldVerify(Adapter, (unsigned char 
*)Adapter->pstargetparams, sizeof(STARGETPARAMS), CONFIG_BEGIN_ADDR);
 
        if (retval)
                bcm_dbg(Adapter, INITEXIT, MP_INIT, ALL,
@@ -257,7 +257,7 @@ static int bcm_compare_buff_contents(unsigned char 
*readbackbuff, unsigned char
 int bcm_ioctl_fw_download(PMINI_ADAPTER Adapter, FIRMWARE_INFO *psFwInfo)
 {
        int retval = STATUS_SUCCESS;
-       PUCHAR buff = NULL;
+       unsigned char *buff = NULL;
 
        /* Config File is needed for the Driver to download the Config file and
         * Firmware. Check for the Config file to be first to be sent from the
@@ -307,7 +307,7 @@ error:
        return retval;
 }
 
-static int buffDnld(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT 
u32FirmwareLength, ULONG u32StartingAddress)
+static int buffDnld(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, UINT 
u32FirmwareLength, ULONG u32StartingAddress)
 {
        unsigned int len = 0;
        int retval = STATUS_SUCCESS;
@@ -329,11 +329,11 @@ static int buffDnld(PMINI_ADAPTER Adapter, PUCHAR 
mappedbuffer, UINT u32Firmware
        return retval;
 }
 
-static int buffRdbkVerify(PMINI_ADAPTER Adapter, PUCHAR mappedbuffer, UINT 
u32FirmwareLength, ULONG u32StartingAddress)
+static int buffRdbkVerify(PMINI_ADAPTER Adapter, unsigned char *mappedbuffer, 
UINT u32FirmwareLength, ULONG u32StartingAddress)
 {
        UINT len = u32FirmwareLength;
        int retval = STATUS_SUCCESS;
-       PUCHAR readbackbuff = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_KERNEL);
+       unsigned char *readbackbuff = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB, 
GFP_KERNEL);
        int bytes;
 
        if (NULL == readbackbuff) {
diff --git a/drivers/staging/bcm/InterfaceInit.c 
b/drivers/staging/bcm/InterfaceInit.c
index de374c3..c63701e 100644
--- a/drivers/staging/bcm/InterfaceInit.c
+++ b/drivers/staging/bcm/InterfaceInit.c
@@ -72,26 +72,26 @@ static void 
ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter)
 
        /* Program EP2 MAX_PKT_SIZE */
        ulReg = ntohl(EP2_MPS_REG);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x128, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x128, 4, TRUE);
        ulReg = ntohl(EP2_MPS);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x12C, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x12C, 4, TRUE);
 
        ulReg = ntohl(EP2_CFG_REG);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x132, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x132, 4, TRUE);
        if 
(((PS_INTERFACE_ADAPTER)(Adapter->pvInterfaceAdapter))->bHighSpeedDevice == 
TRUE) {
                ulReg = ntohl(EP2_CFG_INT);
-               BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE);
+               BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x136, 
4, TRUE);
        } else {
                /* USE BULK EP as TX in FS mode. */
                ulReg = ntohl(EP2_CFG_BULK);
-               BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x136, 4, TRUE);
+               BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x136, 
4, TRUE);
        }
 
        /* Program EP4 MAX_PKT_SIZE. */
        ulReg = ntohl(EP4_MPS_REG);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x13C, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x13C, 4, TRUE);
        ulReg = ntohl(EP4_MPS);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x140, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x140, 4, TRUE);
 
        /* Program TX EP as interrupt(Alternate Setting) */
        bytes = rdmalt(Adapter, 0x0F0110F8, (u32 *)&ulReg, sizeof(u32));
@@ -103,15 +103,15 @@ static void 
ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter)
        ulReg |= 0x6;
 
        ulReg = ntohl(ulReg);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1CC, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1CC, 4, TRUE);
 
        ulReg = ntohl(EP4_CFG_REG);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C8, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1C8, 4, TRUE);
        /* Program ISOCHRONOUS EP size to zero. */
        ulReg = ntohl(ISO_MPS_REG);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1D2, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1D2, 4, TRUE);
        ulReg = ntohl(ISO_MPS);
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1D6, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1D6, 4, TRUE);
 
        /*
         * Update EEPROM Version.
@@ -119,24 +119,24 @@ static void 
ConfigureEndPointTypesThroughEEPROM(PMINI_ADAPTER Adapter)
         */
        ReadBeceemEEPROM(Adapter, 0x1FC, (PUINT)&ulReg);
        ulReg &= 0x0101FFFF;
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1FC, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1FC, 4, TRUE);
 
        /* Update length field if required. Also make the string NULL 
terminated. */
 
        ReadBeceemEEPROM(Adapter, 0xA8, (PUINT)&ulReg);
        if ((ulReg&0x00FF0000)>>16 > 0x30) {
                ulReg = (ulReg&0xFF00FFFF)|(0x30<<16);
-               BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0xA8, 4, TRUE);
+               BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0xA8, 
4, TRUE);
        }
        ReadBeceemEEPROM(Adapter, 0x148, (PUINT)&ulReg);
        if ((ulReg&0x00FF0000)>>16 > 0x30) {
                ulReg = (ulReg&0xFF00FFFF)|(0x30<<16);
-               BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x148, 4, TRUE);
+               BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x148, 
4, TRUE);
        }
        ulReg = 0;
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x122, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x122, 4, TRUE);
        ulReg = 0;
-       BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C2, 4, TRUE);
+       BeceemEEPROMBulkWrite(Adapter, (unsigned char *)&ulReg, 0x1C2, 4, TRUE);
 }
 
 static int usbbcm_device_probe(struct usb_interface *intf, const struct 
usb_device_id *id)
@@ -501,7 +501,7 @@ static int InterfaceAdapterInit(PS_INTERFACE_ADAPTER 
psIntfAdapter)
                                        UINT _uiData = ntohl(EP2_CFG_INT);
                                        bcm_dbg(psIntfAdapter->psAdapter, 
INITEXIT, DRV_ENTRY, ALL,
                                                "Reverting Bulk to int as it is 
in Full Speed mode.\n");
-                                       
BeceemEEPROMBulkWrite(psIntfAdapter->psAdapter, (PUCHAR)&_uiData, 0x136, 4, 
TRUE);
+                                       
BeceemEEPROMBulkWrite(psIntfAdapter->psAdapter, (unsigned char *)&_uiData, 
0x136, 4, TRUE);
                                }
                        } else {
                                usedIntOutForBulkTransfer = EP4 ;
diff --git a/drivers/staging/bcm/InterfaceRx.c 
b/drivers/staging/bcm/InterfaceRx.c
index 537b4b1..336ca4a 100644
--- a/drivers/staging/bcm/InterfaceRx.c
+++ b/drivers/staging/bcm/InterfaceRx.c
@@ -139,7 +139,7 @@ static void read_bulk_callback(struct urb *urb)
                bcm_dbg(psIntfAdapter->psAdapter, RX, RX_DATA, ALL,
                        "Received Data pkt...\n");
                skb_reserve(skb, 2 + SKB_RESERVE_PHS_BYTES);
-               memcpy(skb->data+ETH_HLEN, (PUCHAR)urb->transfer_buffer + 
sizeof(LEADER), pLeader->PLength);
+               memcpy(skb->data+ETH_HLEN, (unsigned char 
*)urb->transfer_buffer + sizeof(LEADER), pLeader->PLength);
                skb->dev = Adapter->dev;
 
                /* currently skb->len has extra ETH_HLEN bytes in the beginning 
*/
diff --git a/drivers/staging/bcm/Misc.c b/drivers/staging/bcm/Misc.c
index 886aef1..d18bcb1 100644
--- a/drivers/staging/bcm/Misc.c
+++ b/drivers/staging/bcm/Misc.c
@@ -2,7 +2,7 @@
 
 static int BcmFileDownload(PMINI_ADAPTER Adapter, const char *path, unsigned 
int loc);
 static VOID doPowerAutoCorrection(PMINI_ADAPTER psAdapter);
-static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer);
+static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, unsigned char 
*pucBuffer);
 static int bcm_parse_target_params(PMINI_ADAPTER Adapter);
 static void beceem_protocol_reset(PMINI_ADAPTER Adapter);
 
@@ -255,7 +255,7 @@ int CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID 
ioBuffer)
        unsigned char *ctrl_buff = NULL;
        UINT pktlen = 0;
        PLINK_REQUEST pLinkReq = NULL;
-       PUCHAR pucAddIndication = NULL;
+       unsigned char *pucAddIndication = NULL;
 
        bcm_dbg(Adapter, TX, TX_CONTROL, ALL, "======>\n");
        if (!ioBuffer) {
@@ -381,7 +381,7 @@ int CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID 
ioBuffer)
                                 * and embed the pointers in the DSX messages 
sent to target.
                                 */
                                /* Lets store the current length of the control 
packet we are transmitting */
-                               pucAddIndication = (PUCHAR)ioBuffer + 
LEADER_SIZE;
+                               pucAddIndication = (unsigned char *)ioBuffer + 
LEADER_SIZE;
                                pktlen = pLeader->PLength;
                                Status = StoreCmControlResponseMessage(Adapter, 
pucAddIndication, &pktlen);
                                if (Status != 1) {
@@ -406,7 +406,7 @@ int CopyBufferToControlPacket(PMINI_ADAPTER Adapter, PVOID 
ioBuffer)
                        "Copying the Control Packet Buffer with length=%d\n",
                        pLeader->PLength);
                *(PLEADER)ctrl_buff = *pLeader;
-               memcpy(ctrl_buff + LEADER_SIZE, ((PUCHAR)ioBuffer + 
LEADER_SIZE), pLeader->PLength);
+               memcpy(ctrl_buff + LEADER_SIZE, ((unsigned char *)ioBuffer + 
LEADER_SIZE), pLeader->PLength);
                bcm_dbg(Adapter, TX, TX_CONTROL, ALL,
                        "Enqueuing the Control Packet\n");
 
@@ -548,7 +548,7 @@ VOID StatisticsResponse(PMINI_ADAPTER Adapter, PVOID 
pvBuffer)
  *
  * Returns     - None.
  ***********************************************************************/
-VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
+VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, unsigned char 
*pucBuffer)
 {
        bcm_dbg(Adapter, RX, RX_DPC, ALL, "=====>\n");
 
@@ -613,7 +613,7 @@ VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, 
PUCHAR pucBuffer)
                        break;
                }
        } else if (SET_MAC_ADDRESS_RESPONSE == *pucBuffer) {
-               PUCHAR puMacAddr = (pucBuffer + 1);
+               unsigned char *puMacAddr = (pucBuffer + 1);
                Adapter->LinkStatus = SYNC_UP_REQUEST;
                bcm_dbg(Adapter, RX, RX_DPC, ALL,
                        "MAC address response, sending SYNC_UP\n");
@@ -1156,7 +1156,7 @@ int InitCardAndDownloadFirmware(PMINI_ADAPTER ps_adapter)
 
        /* Download cfg file */
        status = buffDnldVerify(ps_adapter,
-                               (PUCHAR)ps_adapter->pstargetparams,
+                               (unsigned char *)ps_adapter->pstargetparams,
                                sizeof(STARGETPARAMS),
                                CONFIG_BEGIN_ADDR);
        if (status) {
@@ -1470,14 +1470,14 @@ int wrm(PMINI_ADAPTER Adapter, UINT uiAddress, char 
*pucBuff, size_t sSize)
 int wrmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
 {
        convertEndian(RWM_WRITE, pucBuff, size);
-       return wrm(Adapter, uiAddress, (PUCHAR)pucBuff, size);
+       return wrm(Adapter, uiAddress, (unsigned char *)pucBuff, size);
 }
 
 int rdmalt(PMINI_ADAPTER Adapter, UINT uiAddress, PUINT pucBuff, size_t size)
 {
        int uiRetVal = 0;
 
-       uiRetVal = rdm(Adapter, uiAddress, (PUCHAR)pucBuff, size);
+       uiRetVal = rdm(Adapter, uiAddress, (unsigned char *)pucBuff, size);
        convertEndian(RWM_READ, (PUINT)pucBuff, size);
 
        return uiRetVal;
@@ -1661,7 +1661,7 @@ static VOID SendShutModeResponse(PMINI_ADAPTER Adapter)
        }
 }
 
-static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, PUCHAR pucBuffer)
+static void HandleShutDownModeRequest(PMINI_ADAPTER Adapter, unsigned char 
*pucBuffer)
 {
        B_UINT32 uiResetValue = 0;
 
diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c
index 636698d..0177db4 100644
--- a/drivers/staging/bcm/PHSModule.c
+++ b/drivers/staging/bcm/PHSModule.c
@@ -83,10 +83,10 @@ int PHSTransmit(PMINI_ADAPTER Adapter,
        UINT    unPhsOldHdrSize = 0;
        UINT    unPHSNewPktHeaderLen = 0;
        /* Pointer to PHS IN Hdr Buffer */
-       PUCHAR pucPHSPktHdrInBuf =
+       unsigned char *pucPHSPktHdrInBuf =
                Adapter->stPhsTxContextInfo.ucaHdrSupressionInBuf;
        /* Pointer to PHS OUT Hdr Buffer */
-       PUCHAR  pucPHSPktHdrOutBuf =
+       unsigned char *pucPHSPktHdrOutBuf =
                Adapter->stPhsTxContextInfo.ucaHdrSupressionOutBuf;
        UINT       usPacketType;
        UINT       BytesToRemove=0;
@@ -211,7 +211,7 @@ int PHSReceive(PMINI_ADAPTER Adapter,
        u32   nStandardPktHdrLen                = 0;
        u32   nTotalsupressedPktHdrBytes  = 0;
        int     ulPhsStatus             = 0;
-       PUCHAR pucInBuff = NULL ;
+       unsigned char *pucInBuff = NULL;
        UINT TotalBytesAdded = 0;
        if (!bHeaderSuppressionEnabled) {
                bcm_dbg(Adapter, OTHERS, PHS_RECEIVE, ALL,
@@ -704,8 +704,8 @@ ULONG PhsCompress(IN void* pvContext,
        }
 
        //Compress Packet
-       lStatus = phs_compress(pstPhsRule, (PUCHAR)pvInputBuffer,
-                              (PUCHAR)pvOutputBuffer, pOldHeaderSize, 
pNewHeaderSize);
+       lStatus = phs_compress(pstPhsRule, (unsigned char *)pvInputBuffer,
+                              (unsigned char *)pvOutputBuffer, pOldHeaderSize, 
pNewHeaderSize);
 
        if (lStatus == STATUS_PHS_COMPRESSED) {
                pstPhsRule->PHSModifiedBytes += *pOldHeaderSize - 
*pNewHeaderSize - 1;
@@ -788,8 +788,8 @@ ULONG PhsDeCompress(IN void* pvContext,
 
        }
 
-       *pInHeaderSize = phs_decompress((PUCHAR)pvInputBuffer,
-                                       (PUCHAR)pvOutputBuffer, pstPhsRule, 
pOutHeaderSize);
+       *pInHeaderSize = phs_decompress((unsigned char *)pvInputBuffer,
+                                       (unsigned char *)pvOutputBuffer, 
pstPhsRule, pOutHeaderSize);
 
        pstPhsRule->PHSModifiedBytes += *pOutHeaderSize - *pInHeaderSize - 1;
 
diff --git a/drivers/staging/bcm/PHSModule.h b/drivers/staging/bcm/PHSModule.h
index 63775c3..0e11653 100644
--- a/drivers/staging/bcm/PHSModule.h
+++ b/drivers/staging/bcm/PHSModule.h
@@ -18,7 +18,7 @@ int PHSReceive(PMINI_ADAPTER Adapter,
        );
 
 
-void DumpDataPacketHeader(PUCHAR pPkt);
+void DumpDataPacketHeader(unsigned char *pPkt);
 
 void DumpFullPacket(unsigned char *pBuf, UINT nPktLen);
 
diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h
index a255a82..13f4e67 100644
--- a/drivers/staging/bcm/Prototypes.h
+++ b/drivers/staging/bcm/Prototypes.h
@@ -1,7 +1,7 @@
 #ifndef _PROTOTYPES_H_
 #define _PROTOTYPES_H_
 
-VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, PUCHAR pucBuffer);
+VOID LinkControlResponseMessage(PMINI_ADAPTER Adapter, unsigned char 
*pucBuffer);
 
 VOID StatisticsResponse(PMINI_ADAPTER Adapter, PVOID pvBuffer);
 
@@ -135,7 +135,7 @@ int PropagateCalParamsFromFlashToMemory(PMINI_ADAPTER 
Adapter);
 
 int BeceemEEPROMBulkWrite(
        PMINI_ADAPTER Adapter,
-       PUCHAR pBuffer,
+       unsigned char *pBuffer,
        UINT uiOffset,
        UINT uiNumBytes,
        BOOLEAN bVerify);
diff --git a/drivers/staging/bcm/Qos.c b/drivers/staging/bcm/Qos.c
index 88f615f..5ebc5bb 100644
--- a/drivers/staging/bcm/Qos.c
+++ b/drivers/staging/bcm/Qos.c
@@ -219,7 +219,7 @@ static unsigned short IpVersion4(PMINI_ADAPTER Adapter,
 
        bcm_dbg(Adapter, TX, IPV4_DBG, ALL, "========>\n");
 
-       xprt_hdr=(xporthdr *)((PUCHAR)iphd + sizeof(struct iphdr));
+       xprt_hdr=(xporthdr *)((unsigned char *)iphd + sizeof(struct iphdr));
 
        do {
                bcm_dbg(Adapter, TX, IPV4_DBG, ALL,
@@ -595,7 +595,7 @@ unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct 
sk_buff* skb)
                                }
                                bcm_dbg(Adapter, TX, IPV4_DBG, ALL,
                                        "Dump IP Header :\n");
-                               DumpFullPacket((PUCHAR)pIpHeader, 20);
+                               DumpFullPacket((unsigned char *)pIpHeader, 20);
 
                                if (stEthCsPktInfo.eNwpktIPFrameType == 
eIPv4Packet)
                                        bClassificationSucceed = 
IpVersion4(Adapter, pIpHeader, pstClassifierRule);
@@ -616,7 +616,7 @@ unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct 
sk_buff* skb)
                *((UINT32*)(skb->cb)+SKB_CB_CLASSIFICATION_OFFSET) = 
pstClassifierRule->uiClassifierRuleIndex;
                if ((TCP == pIpHeader->protocol ) && !bFragmentedPkt && 
(ETH_AND_IP_HEADER_LEN + TCP_HEADER_LEN <= skb->len) ) {
                        IpHeaderLength   = pIpHeader->ihl;
-                       pTcpHeader = 
(PTCP_HEADER)(((PUCHAR)pIpHeader)+(IpHeaderLength*4));
+                       pTcpHeader = (PTCP_HEADER)(((unsigned char 
*)pIpHeader)+(IpHeaderLength*4));
                        TcpHeaderLength  = 
GET_TCP_HEADER_LEN(pTcpHeader->HeaderLength);
 
                        if ((pTcpHeader->ucFlags & TCP_ACK) &&
@@ -650,7 +650,7 @@ unsigned short ClassifyPacket(PMINI_ADAPTER Adapter, struct 
sk_buff* skb)
                return INVALID_QUEUE_INDEX;
 }
 
-static BOOLEAN EthCSMatchSrcMACAddress(S_CLASSIFIER_RULE *pstClassifierRule, 
PUCHAR Mac)
+static BOOLEAN EthCSMatchSrcMACAddress(S_CLASSIFIER_RULE *pstClassifierRule, 
unsigned char *Mac)
 {
        UINT i=0;
        PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
@@ -669,7 +669,7 @@ static BOOLEAN EthCSMatchSrcMACAddress(S_CLASSIFIER_RULE 
*pstClassifierRule, PUC
        return TRUE;
 }
 
-static BOOLEAN EthCSMatchDestMACAddress(S_CLASSIFIER_RULE *pstClassifierRule, 
PUCHAR Mac)
+static BOOLEAN EthCSMatchDestMACAddress(S_CLASSIFIER_RULE *pstClassifierRule, 
unsigned char *Mac)
 {
        UINT i=0;
        PMINI_ADAPTER Adapter = GET_BCM_ADAPTER(gblpnetdev);
diff --git a/drivers/staging/bcm/Typedefs.h b/drivers/staging/bcm/Typedefs.h
index 4a5b556..f4c12de 100644
--- a/drivers/staging/bcm/Typedefs.h
+++ b/drivers/staging/bcm/Typedefs.h
@@ -23,7 +23,6 @@ typedef unsigned long DWORD;
 typedef long* PLONG;
 typedef void* PVOID;
 
-typedef unsigned char* PUCHAR;
 typedef unsigned int* PUINT;
 typedef unsigned long* PULONG;
 typedef unsigned long long ULONG64;
diff --git a/drivers/staging/bcm/led_control.c 
b/drivers/staging/bcm/led_control.c
index 6e2509a..580a486 100644
--- a/drivers/staging/bcm/led_control.c
+++ b/drivers/staging/bcm/led_control.c
@@ -263,7 +263,7 @@ static int ValidateDSDParamsChecksum(PMINI_ADAPTER Adapter, 
ULONG ulParamOffset,
                                     unsigned short usParamLen)
 {
        int Status = STATUS_SUCCESS;
-       PUCHAR puBuffer = NULL;
+       unsigned char *puBuffer = NULL;
        unsigned short usChksmOrg = 0;
        unsigned short usChecksumCalculated = 0;
 
@@ -480,7 +480,7 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter,
        unsigned char GPIO_Array[NUM_OF_LEDS+1];
        UINT uiIndex = 0;
        UINT uiNum_of_LED_Type = 0;
-       PUCHAR puCFGData        = NULL;
+       unsigned char *puCFGData = NULL;
        unsigned char bData = 0;
        memset(GPIO_Array, DISABLE_GPIO_NUM, NUM_OF_LEDS+1);
 
@@ -507,7 +507,7 @@ static int ReadConfigFileStructure(PMINI_ADAPTER Adapter,
         */
        bcm_dbg(Adapter, OTHERS, LED_DUMP_INFO, ALL,
                "LED Thread: Config file read successfully\n");
-       puCFGData = (PUCHAR) &Adapter->pstargetparams->HostDrvrConfig1;
+       puCFGData = (unsigned char *)&Adapter->pstargetparams->HostDrvrConfig1;
 
        /*
         * Offset for HostDrvConfig1, HostDrvConfig2, HostDrvConfig3 which
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index 753ec50..1b28a2d 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -27,7 +27,7 @@ static int ReadISOSignature(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL iso);
 
 static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL 
eFlash2xSectionVal);
 static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL 
eFlash2xSectionVal);
-static int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT 
uiSectAlignAddr);
+static int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, unsigned char *pBuff, 
UINT uiSectAlignAddr);
 static int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter, PUINT pBuff,
                                          FLASH2X_SECTION_VAL 
eFlash2xSectionVal,
                                          UINT uiOffset, UINT uiNumBytes);
@@ -205,7 +205,7 @@ int ReadBeceemEEPROMBulk( PMINI_ADAPTER Adapter,
 
        for (dwIndex = 0; dwIndex < dwNumWords; dwIndex++) {
                /* We get only a byte at a time - from LSB to MSB. We shift it 
into an integer. */
-               pvalue = (PUCHAR)(pdwData + dwIndex);
+               pvalue = (unsigned char *)(pdwData + dwIndex);
 
                value =0;
                rdmalt(Adapter, EEPROM_READ_DATAQ_REG, &value, sizeof(value));
@@ -268,7 +268,7 @@ int ReadBeceemEEPROM( PMINI_ADAPTER Adapter,
                ReadBeceemEEPROMBulk(Adapter, uiTempOffset + MAX_RW_SIZE, 
(PUINT)&uiData[4], 4);
        }
 
-       memcpy( (PUCHAR) pBuffer, ( ((PUCHAR)&uiData[0]) + uiByteOffset ), 4);
+       memcpy( (unsigned char *) pBuffer, ( ((unsigned char *)&uiData[0]) + 
uiByteOffset ), 4);
 
        return STATUS_SUCCESS;
 } /* ReadBeceemEEPROM() */
@@ -320,7 +320,7 @@ int BeceemEEPROMBulkRead(
        UINT uiTempOffset         = 0;
        UINT uiExtraBytes     = 0;
        UINT uiFailureRetries = 0;
-       PUCHAR pcBuff = (PUCHAR)pBuffer;
+       unsigned char *pcBuff = (unsigned char *)pBuffer;
 
 
        if (uiOffset%MAX_RW_SIZE&& uiBytesRemaining) {
@@ -328,13 +328,13 @@ int BeceemEEPROMBulkRead(
                uiExtraBytes = uiOffset-uiTempOffset;
                ReadBeceemEEPROMBulk(Adapter, uiTempOffset, (PUINT)&uiData[0], 
4);
                if (uiBytesRemaining >= (MAX_RW_SIZE - uiExtraBytes)) {
-                       memcpy(pBuffer, (((PUCHAR)&uiData[0])+uiExtraBytes), 
MAX_RW_SIZE - uiExtraBytes);
+                       memcpy(pBuffer, (((unsigned char 
*)&uiData[0])+uiExtraBytes), MAX_RW_SIZE - uiExtraBytes);
 
                        uiBytesRemaining -= (MAX_RW_SIZE - uiExtraBytes);
                        uiIndex += (MAX_RW_SIZE - uiExtraBytes);
                        uiOffset += (MAX_RW_SIZE - uiExtraBytes);
                } else {
-                       memcpy(pBuffer, (((PUCHAR)&uiData[0])+uiExtraBytes), 
uiBytesRemaining);
+                       memcpy(pBuffer, (((unsigned char 
*)&uiData[0])+uiExtraBytes), uiBytesRemaining);
                        uiIndex += uiBytesRemaining;
                        uiOffset += uiBytesRemaining;
                        uiBytesRemaining = 0;
@@ -374,7 +374,7 @@ int BeceemEEPROMBulkRead(
                        }
                } else
                { // Handle the reads less than 4 bytes...
-                       PUCHAR pCharBuff = (PUCHAR)pBuffer;
+                       unsigned char *pCharBuff = (unsigned char *)pBuffer;
                        pCharBuff += uiIndex;
                        if (0 == ReadBeceemEEPROM(Adapter, 
uiOffset,&uiData[0])) {
                                memcpy(pCharBuff,&uiData[0], 
uiBytesRemaining);//copy only bytes requested.
@@ -536,7 +536,7 @@ static UINT BcmGetEEPROMSize(PMINI_ADAPTER Adapter)
 //
 
                uiData = 0xBABEFACE;
-               if (0 == BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&uiData, 0, 4, 
TRUE)) {
+               if (0 == BeceemEEPROMBulkWrite(Adapter, (unsigned char 
*)&uiData, 0, 4, TRUE)) {
                        uiData = 0;
                        for (uiIndex = 2; uiIndex <= 256; uiIndex *= 2) {
                                BeceemEEPROMBulkRead(Adapter,&uiData, 
uiIndex*1024, 4);
@@ -638,7 +638,7 @@ static int flashByteWrite(
        int iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3
 
        UINT value;
-       ULONG ulData = *(PUCHAR)pData;
+       ULONG ulData = *(unsigned char *)pData;
        int bytes;
 
 //
@@ -800,7 +800,7 @@ static int flashByteWriteStatus(
 {
        UINT uiStatus = 0;
        int iRetries = MAX_FLASH_RETRIES * FLASH_PER_RETRIES_DELAY; //3
-       ULONG ulData  = *(PUCHAR)pData;
+       ULONG ulData  = *(unsigned char *)pData;
        UINT value;
        int bytes;
 
@@ -1077,7 +1077,7 @@ static int BeceemFlashBulkWrite(
        BOOLEAN bVerify)
 {
        char *pTempBuff = NULL;
-       PUCHAR pcBuffer             = (PUCHAR)pBuffer;
+       unsigned char *pcBuffer = (unsigned char *)pBuffer;
        UINT  uiIndex                           = 0;
        UINT  uiOffsetFromSectStart = 0;
        UINT  uiSectAlignAddr           = 0;
@@ -1177,7 +1177,7 @@ static int BeceemFlashBulkWrite(
                }
 
                if (IsFlash2x(Adapter)) {
-                       SaveHeaderIfPresent(Adapter, (PUCHAR)pTempBuff, 
uiOffsetFromSectStart);
+                       SaveHeaderIfPresent(Adapter, (unsigned char 
*)pTempBuff, uiOffsetFromSectStart);
                }
 
                FlashSectorErase(Adapter, uiPartOffset, 1);
@@ -1291,7 +1291,7 @@ static int BeceemFlashBulkWriteStatus(
        BOOLEAN bVerify)
 {
        char *pTempBuff = NULL;
-       PUCHAR pcBuffer             = (PUCHAR)pBuffer;
+       unsigned char *pcBuffer = (unsigned char *)pBuffer;
        UINT  uiIndex                           = 0;
        UINT  uiOffsetFromSectStart = 0;
        UINT  uiSectAlignAddr           = 0;
@@ -1373,7 +1373,7 @@ static int BeceemFlashBulkWriteStatus(
                }
 
                if (IsFlash2x(Adapter)) {
-                       SaveHeaderIfPresent(Adapter, (PUCHAR)pTempBuff, 
uiOffsetFromSectStart);
+                       SaveHeaderIfPresent(Adapter, (unsigned char 
*)pTempBuff, uiOffsetFromSectStart);
                }
 
                FlashSectorErase(Adapter, uiPartOffset, 1);
@@ -1609,7 +1609,7 @@ static int BeceemEEPROMReadBackandVerify(
 
                        if (memcmp(&pBuffer[uiIndex],&auiData[0], MAX_RW_SIZE)) 
{
                                // re-write
-                               BeceemEEPROMBulkWrite(Adapter, 
(PUCHAR)(pBuffer+uiIndex), uiOffset, MAX_RW_SIZE, FALSE);
+                               BeceemEEPROMBulkWrite(Adapter, (unsigned char 
*)(pBuffer+uiIndex), uiOffset, MAX_RW_SIZE, FALSE);
                                mdelay(3);
                                BeceemEEPROMBulkRead(Adapter,&auiData[0], 
uiOffset, MAX_RW_SIZE);
 
@@ -1625,7 +1625,7 @@ static int BeceemEEPROMReadBackandVerify(
                        BeceemEEPROMBulkRead(Adapter,&uiData, uiOffset, 4);
                        if (uiData != pBuffer[uiIndex]) {
                                //re-write
-                               BeceemEEPROMBulkWrite(Adapter, 
(PUCHAR)(pBuffer+uiIndex), uiOffset, 4, FALSE);
+                               BeceemEEPROMBulkWrite(Adapter, (unsigned char 
*)(pBuffer+uiIndex), uiOffset, 4, FALSE);
                                mdelay(3);
                                BeceemEEPROMBulkRead(Adapter,&uiData, uiOffset, 
4);
                                if (uiData != pBuffer[uiIndex]) {
@@ -1639,7 +1639,7 @@ static int BeceemEEPROMReadBackandVerify(
                } else
                { // Handle the reads less than 4 bytes...
                        uiData = 0;
-                       memcpy(&uiData, 
((PUCHAR)pBuffer)+(uiIndex*sizeof(UINT)), uiNumBytes);
+                       memcpy(&uiData, ((unsigned char 
*)pBuffer)+(uiIndex*sizeof(UINT)), uiNumBytes);
                        BeceemEEPROMBulkRead(Adapter,&uiRdbk, uiOffset, 4);
 
                        if (memcmp(&uiData, &uiRdbk, uiNumBytes))
@@ -1707,19 +1707,19 @@ static int BeceemEEPROMWritePage( PMINI_ADAPTER 
Adapter, UINT uiData[], UINT uiO
 
        value = uiData[0];
        BcmSwapWord(&value);
-       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (PUCHAR)&value, 4);
+       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (unsigned char *)&value, 4);
 
        value = uiData[1];
        BcmSwapWord(&value);
-       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (PUCHAR)&value, 4);
+       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (unsigned char *)&value, 4);
 
        value = uiData[2];
        BcmSwapWord(&value);
-       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (PUCHAR)&value, 4);
+       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (unsigned char *)&value, 4);
 
        value = uiData[3];
        BcmSwapWord(&value);
-       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (PUCHAR)&value, 4);
+       wrm( Adapter, EEPROM_WRITE_DATAQ_REG, (unsigned char *)&value, 4);
 
        /* NOTE : After this write, on readback of EEPROM_SPI_Q_STATUS1_REG
         * shows that we see 7 for the EEPROM data write.  Which means that
@@ -1814,7 +1814,7 @@ static int BeceemEEPROMWritePage( PMINI_ADAPTER Adapter, 
UINT uiData[], UINT uiO
 
 int BeceemEEPROMBulkWrite(
        PMINI_ADAPTER Adapter,
-       PUCHAR pBuffer,
+       unsigned char *pBuffer,
        UINT uiOffset,
        UINT uiNumBytes,
        BOOLEAN bVerify)
@@ -1836,7 +1836,7 @@ int BeceemEEPROMBulkWrite(
                BeceemEEPROMBulkRead(Adapter,&uiData[0], uiTempOffset, 
MAX_RW_SIZE);
 
                if (uiBytesToCopy >= (16 -uiExtraBytes)) {
-                       memcpy((((PUCHAR)&uiData[0])+uiExtraBytes), pBuffer, 
MAX_RW_SIZE- uiExtraBytes);
+                       memcpy((((unsigned char *)&uiData[0])+uiExtraBytes), 
pBuffer, MAX_RW_SIZE- uiExtraBytes);
 
                        if ( STATUS_FAILURE == BeceemEEPROMWritePage( Adapter, 
uiData, uiTempOffset ) )
                                return STATUS_FAILURE;
@@ -1845,7 +1845,7 @@ int BeceemEEPROMBulkWrite(
                        uiIndex += (MAX_RW_SIZE - uiExtraBytes);
                        uiOffset += (MAX_RW_SIZE - uiExtraBytes);
                } else {
-                       memcpy((((PUCHAR)&uiData[0])+uiExtraBytes), pBuffer, 
uiBytesToCopy);
+                       memcpy((((unsigned char *)&uiData[0])+uiExtraBytes), 
pBuffer, uiBytesToCopy);
 
                        if ( STATUS_FAILURE == BeceemEEPROMWritePage( Adapter, 
uiData, uiTempOffset ) )
                                return STATUS_FAILURE;
@@ -1919,7 +1919,7 @@ int BeceemNVMRead(
        if (Adapter->eNVMType == NVM_FLASH) {
                if (Adapter->bFlashRawRead == FALSE) {
                        if (IsSectionExistInVendorInfo(Adapter, 
Adapter->eActiveDSD))
-                               return vendorextnReadSection(Adapter, 
(PUCHAR)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes);
+                               return vendorextnReadSection(Adapter, (unsigned 
char *)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes);
                        uiOffset = uiOffset+ Adapter->ulFlashCalStart ;
                }
 #if defined(BCM_SHM_INTERFACE) && !defined(FLASH_DIRECT_ACCESS)
@@ -1980,7 +1980,7 @@ int BeceemNVMWrite(
 
        if (Adapter->eNVMType == NVM_FLASH) {
                if (IsSectionExistInVendorInfo(Adapter, Adapter->eActiveDSD))
-                       Status = vendorextnWriteSection(Adapter, 
(PUCHAR)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes, bVerify);
+                       Status = vendorextnWriteSection(Adapter, (unsigned char 
*)pBuffer, Adapter->eActiveDSD, uiOffset, uiNumBytes, bVerify);
                else {
                        uiFlashOffset = uiOffset + Adapter->ulFlashCalStart;
 
@@ -2025,7 +2025,7 @@ int BeceemNVMWrite(
                } else {
                        if ((uiOffset+uiNumBytes) > EEPROM_CALPARAM_START) {
                                ULONG ulBytesTobeSkipped = 0;
-                               PUCHAR pcBuffer = (PUCHAR)pBuffer;// char 
pointer to take care of odd byte cases.
+                               unsigned char *pcBuffer = (unsigned char 
*)pBuffer;// char pointer to take care of odd byte cases.
                                uiNumBytes -= (EEPROM_CALPARAM_START - 
uiOffset);
                                ulBytesTobeSkipped += (EEPROM_CALPARAM_START - 
uiOffset);
                                uiOffset += (EEPROM_CALPARAM_START - uiOffset);
@@ -2048,7 +2048,7 @@ int BeceemNVMWrite(
                wrmalt(Adapter, 0x0f000C80,&uiTemp, sizeof(uiTemp));
        } else if (Adapter->eNVMType == NVM_EEPROM) {
                Status = BeceemEEPROMBulkWrite(Adapter,
-                                              (PUCHAR)pBuffer,
+                                              (unsigned char *)pBuffer,
                                               uiOffset,
                                               uiNumBytes,
                                               bVerify);
@@ -3095,7 +3095,7 @@ int BcmFlash2xBulkRead(
        }
 
        if (IsSectionExistInVendorInfo(Adapter, eFlash2xSectionVal))
-               return vendorextnReadSection(Adapter, (PUCHAR)pBuffer, 
eFlash2xSectionVal, uiOffsetWithinSectionVal, uiNumBytes);
+               return vendorextnReadSection(Adapter, (unsigned char *)pBuffer, 
eFlash2xSectionVal, uiOffsetWithinSectionVal, uiNumBytes);
 
        //calculating  the absolute offset from FLASH;
        uiAbsoluteOffset = uiOffsetWithinSectionVal + SectionStartOffset;
@@ -3161,7 +3161,7 @@ int BcmFlash2xBulkWrite(
        }
 
        if (IsSectionExistInVendorInfo(Adapter, eFlash2xSectVal))
-               return vendorextnWriteSection(Adapter, (PUCHAR)pBuffer, 
eFlash2xSectVal, uiOffset, uiNumBytes, bVerify);
+               return vendorextnWriteSection(Adapter, (unsigned char 
*)pBuffer, eFlash2xSectVal, uiOffset, uiNumBytes, bVerify);
 
        //calculating  the absolute offset from FLASH;
        uiOffset = uiOffset + FlashSectValStartOffset;
@@ -4331,7 +4331,7 @@ int       BcmCopySection(PMINI_ADAPTER Adapter,
 {
        UINT BuffSize = 0 ;
        UINT BytesToBeCopied = 0;
-       PUCHAR pBuff = NULL ;
+       unsigned char *pBuff = NULL;
        int Status = STATUS_SUCCESS ;
        if (SrcSection == DstSection) {
                pr_info("Source and Destination should be different ...try 
again\n");
@@ -4433,11 +4433,11 @@ int     BcmCopySection(PMINI_ADAPTER Adapter,
 
 **/
 
-int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR pBuff, UINT uiOffset)
+int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, unsigned char *pBuff, UINT 
uiOffset)
 {
        UINT offsetToProtect = 0, HeaderSizeToProtect =0;
        BOOLEAN bHasHeader = FALSE ;
-       PUCHAR pTempBuff =NULL;
+       unsigned char *pTempBuff = NULL;
        UINT uiSectAlignAddr = 0;
        UINT sig = 0;
 
@@ -4463,7 +4463,7 @@ int SaveHeaderIfPresent(PMINI_ADAPTER Adapter, PUCHAR 
pBuff, UINT uiOffset)
        }
        //If Header is present overwrite passed buffer with this
        if (bHasHeader && (Adapter->bHeaderChangeAllowed == FALSE)) {
-               pTempBuff = (PUCHAR)kzalloc(HeaderSizeToProtect, GFP_KERNEL);
+               pTempBuff = (unsigned char *)kzalloc(HeaderSizeToProtect, 
GFP_KERNEL);
                if (pTempBuff == NULL) {
                        pr_info("Memory allocation failed\n");
                        return -ENOMEM;
@@ -4585,7 +4585,7 @@ int ReadDSDSignature(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL dsd)
        //DSD_HEADER dsdHeader = {0};
 
 
-       //sigoffsetInMap =(PUCHAR)&(dsdHeader.DSDImageMagicNumber) 
-(PUCHAR)&dsdHeader;
+       //sigoffsetInMap =(unsigned char *)&(dsdHeader.DSDImageMagicNumber) 
-(unsigned char *)&dsdHeader;
 
        if (dsd != DSD0 && dsd != DSD1 && dsd != DSD2) {
                pr_info("passed section value is not for DSDs\n");
@@ -4608,7 +4608,7 @@ int ReadDSDPriority(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL dsd)
        //UINT priOffsetInMap = 0 ;
        unsigned int uiDSDPri = STATUS_FAILURE;
        //DSD_HEADER dsdHeader = {0};
-       //priOffsetInMap = (PUCHAR)&(dsdHeader.DSDImagePriority) 
-(PUCHAR)&dsdHeader;
+       //priOffsetInMap = (unsigned char *)&(dsdHeader.DSDImagePriority) 
-(unsigned char *)&dsdHeader;
        if (IsSectionWritable(Adapter, dsd)) {
                if (ReadDSDSignature(Adapter, dsd)== DSD_IMAGE_MAGIC_NUMBER) {
                        BcmFlash2xBulkRead(Adapter,
@@ -4663,7 +4663,7 @@ int ReadISOSignature(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL iso)
        //ISO_HEADER ISOHeader = {0};
 
 
-       //sigoffsetInMap =(PUCHAR)&(ISOHeader.ISOImageMagicNumber) 
-(PUCHAR)&ISOHeader;
+       //sigoffsetInMap =(unsigned char *)&(ISOHeader.ISOImageMagicNumber) 
-(unsigned char *)&ISOHeader;
 
        if (iso != ISO_IMAGE1 && iso != ISO_IMAGE2) {
                pr_info("passed section value is not for ISOs\n");
@@ -4739,7 +4739,7 @@ int WriteToFlashWithoutSectorErase(PMINI_ADAPTER Adapter,
        UINT uiStartOffset = 0;
        //Adding section start address
        int Status = STATUS_SUCCESS;
-       PUCHAR pcBuff = (PUCHAR)pBuff;
+       unsigned char *pcBuff = (unsigned char *)pBuff;
 
        if (uiNumBytes % Adapter->ulFlashWriteSize) {
                pr_info("Writing without Sector Erase for non-FlashWriteSize 
number of bytes 0x%x\n",
@@ -4865,7 +4865,7 @@ int IsSectionWritable(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL Section)
 static int CorruptDSDSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL 
eFlash2xSectionVal)
 {
 
-       PUCHAR pBuff = NULL;
+       unsigned char *pBuff = NULL;
        UINT sig = 0;
        UINT uiOffset = 0;
        UINT BlockStatus = 0;
@@ -4880,7 +4880,7 @@ static int CorruptDSDSig(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL eFlash2xSect
                }
        }
 
-       pBuff = (PUCHAR)kzalloc(MAX_RW_SIZE, GFP_KERNEL);
+       pBuff = kzalloc(MAX_RW_SIZE, GFP_KERNEL);
        if (pBuff == NULL) {
                pr_info("Can't allocate memory\n");
                return -ENOMEM ;
@@ -4928,7 +4928,7 @@ static int CorruptDSDSig(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL eFlash2xSect
 static int CorruptISOSig(PMINI_ADAPTER Adapter, FLASH2X_SECTION_VAL 
eFlash2xSectionVal)
 {
 
-       PUCHAR pBuff = NULL;
+       unsigned char *pBuff = NULL;
        UINT sig = 0;
        UINT uiOffset = 0;
 
@@ -4939,7 +4939,7 @@ static int CorruptISOSig(PMINI_ADAPTER Adapter, 
FLASH2X_SECTION_VAL eFlash2xSect
                return SECTOR_IS_NOT_WRITABLE;
        }
 
-       pBuff = (PUCHAR)kzalloc(MAX_RW_SIZE, GFP_KERNEL);
+       pBuff = kzalloc(MAX_RW_SIZE, GFP_KERNEL);
        if (pBuff == NULL) {
                pr_info("Can't allocate memory\n");
                return -ENOMEM ;
diff --git a/drivers/staging/bcm/nvm.h b/drivers/staging/bcm/nvm.h
index d8b45ec..c8e38e9 100644
--- a/drivers/staging/bcm/nvm.h
+++ b/drivers/staging/bcm/nvm.h
@@ -396,6 +396,6 @@ typedef struct _ISO_HEADER {
 #define DEFAULT_BUFF_SIZE 0x10000
 
 
-#define FIELD_OFFSET_IN_HEADER(HeaderPointer, Field) 
((PUCHAR)&((HeaderPointer)(NULL))->Field - (PUCHAR)(NULL))
+#define FIELD_OFFSET_IN_HEADER(HeaderPointer, Field) ((unsigned char 
*)&((HeaderPointer)(NULL))->Field - (unsigned char *)(NULL))
 
 #endif
diff --git a/drivers/staging/bcm/vendorspecificextn.c 
b/drivers/staging/bcm/vendorspecificextn.c
index 8f24fc6..924cd1f 100644
--- a/drivers/staging/bcm/vendorspecificextn.c
+++ b/drivers/staging/bcm/vendorspecificextn.c
@@ -89,7 +89,7 @@ int vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG 
arg)
 //
 //------------------------------------------------------------------
 
-int vendorextnReadSection(PVOID  pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL 
SectionVal,
+int vendorextnReadSection(PVOID  pContext, unsigned char *pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
                          UINT offset, UINT numOfBytes)
 {
        return STATUS_FAILURE;
@@ -114,7 +114,7 @@ int vendorextnReadSection(PVOID  pContext, PUCHAR pBuffer, 
FLASH2X_SECTION_VAL S
 //             STATUS_SUCCESS/STATUS_FAILURE
 //
 //------------------------------------------------------------------
-int vendorextnWriteSection(PVOID  pContext, PUCHAR pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
+int vendorextnWriteSection(PVOID  pContext, unsigned char *pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
                           UINT offset, UINT numOfBytes, BOOLEAN bVerify)
 {
        return STATUS_FAILURE;
@@ -138,7 +138,7 @@ int vendorextnWriteSection(PVOID  pContext, PUCHAR pBuffer, 
FLASH2X_SECTION_VAL
 //             STATUS_SUCCESS/STATUS_FAILURE
 //
 //------------------------------------------------------------------
-int vendorextnWriteSectionWithoutErase(PVOID  pContext, PUCHAR pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
+int vendorextnWriteSectionWithoutErase(PVOID  pContext, unsigned char 
*pBuffer, FLASH2X_SECTION_VAL SectionVal,
                                       UINT offset, UINT numOfBytes)
 {
        return STATUS_FAILURE;
diff --git a/drivers/staging/bcm/vendorspecificextn.h 
b/drivers/staging/bcm/vendorspecificextn.h
index 83088b8..f646eff 100644
--- a/drivers/staging/bcm/vendorspecificextn.h
+++ b/drivers/staging/bcm/vendorspecificextn.h
@@ -8,11 +8,11 @@ int vendorextnGetSectionInfo(PVOID  pContext, 
PFLASH2X_VENDORSPECIFIC_INFO pVend
 int vendorextnExit(PMINI_ADAPTER Adapter);
 int vendorextnInit(PMINI_ADAPTER Adapter);
 int vendorextnIoctl(PMINI_ADAPTER Adapter, UINT cmd, ULONG arg);
-int vendorextnReadSection(PVOID  pContext, PUCHAR pBuffer, FLASH2X_SECTION_VAL 
SectionVal,
+int vendorextnReadSection(PVOID  pContext, unsigned char *pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
                          UINT offset, UINT numOfBytes);
-int vendorextnWriteSection(PVOID  pContext, PUCHAR pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
+int vendorextnWriteSection(PVOID  pContext, unsigned char *pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
                           UINT offset, UINT numOfBytes, BOOLEAN bVerify);
-int vendorextnWriteSectionWithoutErase(PVOID  pContext, PUCHAR pBuffer, 
FLASH2X_SECTION_VAL SectionVal,
+int vendorextnWriteSectionWithoutErase(PVOID  pContext, unsigned char 
*pBuffer, FLASH2X_SECTION_VAL SectionVal,
                                       UINT offset, UINT numOfBytes);
 
 #endif /*  */
-- 
1.7.8.111.gad25c.dirty

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to