From: Kevin McKinney Date: Thu, 22 Nov 2012 19:48:42 +0000 (-0500) Subject: Staging: bcm: Remove typedef for _FLASH2X_BITMAP and call directly. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d48a430c2ce42d0a2e214bb6ac93a9e5ab9393c4;p=linux-beck.git Staging: bcm: Remove typedef for _FLASH2X_BITMAP and call directly. This patch removes typedef for _FLASH2X_BITMAP, and changes the name of the struct to bcm_flash2x_bitmap. In addition, any calls to typedefs FLASH2X_BITMAP, or *PFLASH2X_BITMAP are changed to call the struct directly. Signed-off-by: Kevin McKinney Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 6cf1e5bb03e1..745a4e298324 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -1604,16 +1604,16 @@ cntrlEnd: break; case IOCTL_BCM_GET_FLASH2X_SECTION_BITMAP: { - PFLASH2X_BITMAP psFlash2xBitMap; + struct bcm_flash2x_bitmap *psFlash2xBitMap; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_GET_FLASH2X_SECTION_BITMAP Called"); if (copy_from_user(&IoBuffer, argp, sizeof(IOCTL_BUFFER))) return -EFAULT; - if (IoBuffer.OutputLength != sizeof(FLASH2X_BITMAP)) + if (IoBuffer.OutputLength != sizeof(struct bcm_flash2x_bitmap)) return -EINVAL; - psFlash2xBitMap = kzalloc(sizeof(FLASH2X_BITMAP), GFP_KERNEL); + psFlash2xBitMap = kzalloc(sizeof(struct bcm_flash2x_bitmap), GFP_KERNEL); if (psFlash2xBitMap == NULL) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory is not available"); return -ENOMEM; @@ -1634,7 +1634,7 @@ cntrlEnd: BcmGetFlash2xSectionalBitMap(Adapter, psFlash2xBitMap); up(&Adapter->NVMRdmWrmLock); - if (copy_to_user(IoBuffer.OutputBuffer, psFlash2xBitMap, sizeof(FLASH2X_BITMAP))) { + if (copy_to_user(IoBuffer.OutputBuffer, psFlash2xBitMap, sizeof(struct bcm_flash2x_bitmap))) { kfree(psFlash2xBitMap); return -EFAULT; } diff --git a/drivers/staging/bcm/Ioctl.h b/drivers/staging/bcm/Ioctl.h index c7c6404c2210..a77a7e292667 100644 --- a/drivers/staging/bcm/Ioctl.h +++ b/drivers/staging/bcm/Ioctl.h @@ -191,7 +191,7 @@ typedef enum _SECTION_TYPE { * Bit [7...3] = Reserved */ -typedef struct _FLASH2X_BITMAP { +struct bcm_flash2x_bitmap { unsigned char ISO_IMAGE1; unsigned char ISO_IMAGE2; unsigned char DSD0; @@ -206,7 +206,7 @@ typedef struct _FLASH2X_BITMAP { unsigned char Reserved0; unsigned char Reserved1; unsigned char Reserved2; -} FLASH2X_BITMAP, *PFLASH2X_BITMAP; +}; struct bcm_time_elapsed { unsigned long long ul64TimeElapsedSinceNetEntry; diff --git a/drivers/staging/bcm/Prototypes.h b/drivers/staging/bcm/Prototypes.h index e3f01cbe51fa..9115f01b4a92 100644 --- a/drivers/staging/bcm/Prototypes.h +++ b/drivers/staging/bcm/Prototypes.h @@ -163,7 +163,7 @@ INT BcmInitNVM(struct bcm_mini_adapter *Adapter); INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize); BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section); -INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, PFLASH2X_BITMAP psFlash2xBitMap); +INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap); INT BcmFlash2xBulkWrite( struct bcm_mini_adapter *Adapter, diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c index b034eb5fa6b1..7f874db1197b 100644 --- a/drivers/staging/bcm/nvm.c +++ b/drivers/staging/bcm/nvm.c @@ -3064,7 +3064,7 @@ B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset return FALSE; } -static int BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) +static int BcmDumpFlash2xSectionBitMap(struct bcm_flash2x_bitmap *psFlash2xBitMap) { struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev); @@ -3099,7 +3099,7 @@ static int BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) * Failure:- negative error code */ -int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, PFLASH2X_BITMAP psFlash2xBitMap) +int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap) { PFLASH2X_CS_INFO psFlash2xCSInfo = Adapter->psFlash2xCSInfo; FLASH2X_SECTION_VAL uiHighestPriDSD = 0;