Staging: bcm: Remove typedef for _FLASH2X_BITMAP and call directly.
authorKevin McKinney <klmckinney1@gmail.com>
Thu, 22 Nov 2012 19:48:42 +0000 (14:48 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2012 00:05:14 +0000 (16:05 -0800)
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 <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/Bcmchar.c
drivers/staging/bcm/Ioctl.h
drivers/staging/bcm/Prototypes.h
drivers/staging/bcm/nvm.c

index 6cf1e5bb03e1bc1afc23ca9a4427d7ab8054b664..745a4e298324777bf089ea18e117d7d414afdf8e 100644 (file)
@@ -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;
                }
index c7c6404c221084f83baba64483cdb52d40274e85..a77a7e29266721bacedce74a71b977c0004407fd 100644 (file)
@@ -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;
index e3f01cbe51fa1fddd534c3ca3b34b5b672a9a58e..9115f01b4a92fc446983dc0e2a2f05fcbd281b54 100644 (file)
@@ -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,
index b034eb5fa6b107d229207547b2f860d6e2391084..7f874db1197bc54af11c5500935ad42990388820 100644 (file)
@@ -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;