This patch removes typedef for _FLASH_2X_CS_INFO, and
changes the name of the struct to bcm_flash2x_cs_info.
In addition, any calls to typedefs FLASH2X_CS_INFO, or
*PFLASH2X_CS_INFO are changed to call the struct
directly.

Signed-off-by: Kevin McKinney <[email protected]>
---
 drivers/staging/bcm/Adapter.h |    2 +-
 drivers/staging/bcm/Bcmchar.c |    6 +++---
 drivers/staging/bcm/nvm.c     |   12 ++++++------
 drivers/staging/bcm/nvm.h     |    4 ++--
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/bcm/Adapter.h b/drivers/staging/bcm/Adapter.h
index 4231b67..d002aea 100644
--- a/drivers/staging/bcm/Adapter.h
+++ b/drivers/staging/bcm/Adapter.h
@@ -366,7 +366,7 @@ struct bcm_mini_adapter {
        struct device           *pstCreatedClassDevice;
 
        /*      BOOLEAN                         InterfaceUpStatus; */
-       PFLASH2X_CS_INFO        psFlash2xCSInfo;
+       struct bcm_flash2x_cs_info *psFlash2xCSInfo;
        PFLASH_CS_INFO          psFlashCSInfo;
        struct bcm_flash2x_vendor_info *psFlash2xVendorInfo;
        UINT                    uiFlashBaseAdd; /* Flash start address */
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index efad33e..300d60a 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -1783,16 +1783,16 @@ cntrlEnd:
                }
 
                if (IsFlash2x(Adapter) == TRUE) {
-                       if (IoBuffer.OutputLength < sizeof(FLASH2X_CS_INFO))
+                       if (IoBuffer.OutputLength < sizeof(struct 
bcm_flash2x_cs_info))
                                return -EINVAL;
 
-                       if (copy_to_user(IoBuffer.OutputBuffer, 
Adapter->psFlash2xCSInfo, sizeof(FLASH2X_CS_INFO)))
+                       if (copy_to_user(IoBuffer.OutputBuffer, 
Adapter->psFlash2xCSInfo, sizeof(struct bcm_flash2x_cs_info)))
                                return -EFAULT;
                } else {
                        if (IoBuffer.OutputLength < sizeof(FLASH_CS_INFO))
                                return -EINVAL;
 
-                       if (copy_to_user(IoBuffer.OutputBuffer, 
Adapter->psFlashCSInfo, sizeof(FLASH_CS_INFO)))
+                       if (copy_to_user(IoBuffer.OutputBuffer, 
Adapter->psFlashCSInfo, sizeof(struct bcm_flash2x_cs_info)))
                                return -EFAULT;
                }
        }
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index 8f7ff24..66f93c7 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -2234,7 +2234,7 @@ int BcmAllocFlashCSStructure(struct bcm_mini_adapter 
*psAdapter)
                return -ENOMEM;
        }
 
-       psAdapter->psFlash2xCSInfo = 
(PFLASH2X_CS_INFO)kzalloc(sizeof(FLASH2X_CS_INFO), GFP_KERNEL);
+       psAdapter->psFlash2xCSInfo = (struct bcm_flash2x_cs_info 
*)kzalloc(sizeof(struct bcm_flash2x_cs_info), GFP_KERNEL);
        if (!psAdapter->psFlash2xCSInfo) {
                BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Can't 
Allocate memory for Flash 2.x");
                kfree(psAdapter->psFlashCSInfo);
@@ -2264,7 +2264,7 @@ int BcmDeAllocFlashCSStructure(struct bcm_mini_adapter 
*psAdapter)
        return STATUS_SUCCESS;
 }
 
-static int BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo, struct 
bcm_mini_adapter *Adapter)
+static int BcmDumpFlash2XCSStructure(struct bcm_flash2x_cs_info 
*psFlash2xCSInfo, struct bcm_mini_adapter *Adapter)
 {
        unsigned int Index = 0;
 
@@ -2324,7 +2324,7 @@ static int BcmDumpFlash2XCSStructure(PFLASH2X_CS_INFO 
psFlash2xCSInfo, struct bc
        return STATUS_SUCCESS;
 }
 
-static int ConvertEndianOf2XCSStructure(PFLASH2X_CS_INFO psFlash2xCSInfo)
+static int ConvertEndianOf2XCSStructure(struct bcm_flash2x_cs_info 
*psFlash2xCSInfo)
 {
        unsigned int Index = 0;
 
@@ -2523,7 +2523,7 @@ static int BcmGetFlashCSInfo(struct bcm_mini_adapter 
*Adapter)
        Adapter->uiFlashBaseAdd = 0;
        Adapter->ulFlashCalStart = 0;
        memset(Adapter->psFlashCSInfo, 0 , sizeof(FLASH_CS_INFO));
-       memset(Adapter->psFlash2xCSInfo, 0 , sizeof(FLASH2X_CS_INFO));
+       memset(Adapter->psFlash2xCSInfo, 0 , sizeof(struct 
bcm_flash2x_cs_info));
 
        if (!Adapter->bDDRInitDone) {
                value = FLASH_CONTIGIOUS_START_ADDR_BEFORE_INIT;
@@ -2576,7 +2576,7 @@ static int BcmGetFlashCSInfo(struct bcm_mini_adapter 
*Adapter)
                Adapter->uiFlashBaseAdd = Adapter->psFlashCSInfo->FlashBaseAddr 
& 0xFCFFFFFF;
        } else {
                if (BcmFlash2xBulkRead(Adapter, 
(PUINT)Adapter->psFlash2xCSInfo, NO_SECTION_VAL,
-                                       Adapter->ulFlashControlSectionStart, 
sizeof(FLASH2X_CS_INFO))) {
+                                       Adapter->ulFlashControlSectionStart, 
sizeof(struct bcm_flash2x_cs_info))) {
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Unable 
to read CS structure\n");
                        return STATUS_FAILURE;
                }
@@ -3101,7 +3101,7 @@ static int BcmDumpFlash2xSectionBitMap(struct 
bcm_flash2x_bitmap *psFlash2xBitMa
 
 int BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct 
bcm_flash2x_bitmap *psFlash2xBitMap)
 {
-       PFLASH2X_CS_INFO psFlash2xCSInfo = Adapter->psFlash2xCSInfo;
+       struct bcm_flash2x_cs_info *psFlash2xCSInfo = Adapter->psFlash2xCSInfo;
        enum bcm_flash2x_section_val uiHighestPriDSD = 0;
        enum bcm_flash2x_section_val uiHighestPriISO = 0;
        BOOLEAN SetActiveDSDDone = FALSE;
diff --git a/drivers/staging/bcm/nvm.h b/drivers/staging/bcm/nvm.h
index 9904e64..fd0638e 100644
--- a/drivers/staging/bcm/nvm.h
+++ b/drivers/staging/bcm/nvm.h
@@ -55,7 +55,7 @@ typedef struct _FLASH_CS_INFO {
 #define FLASH2X_TOTAL_SIZE     (64 * 1024 * 1024)
 #define DEFAULT_SECTOR_SIZE    (64 * 1024)
 
-typedef struct _FLASH_2X_CS_INFO {
+struct bcm_flash2x_cs_info {
        u32 MagicNumber;
        u32 FlashLayoutVersion;
        u32 ISOImageVersion;
@@ -103,7 +103,7 @@ typedef struct _FLASH_2X_CS_INFO {
        u32 OffsetFromZeroForVSA2End;
        u32 SectorAccessBitMap[FLASH2X_TOTAL_SIZE / (DEFAULT_SECTOR_SIZE * 16)];
        /* All expansions to the control data structure should add here */
-} FLASH2X_CS_INFO, *PFLASH2X_CS_INFO;
+};
 
 struct bcm_vendor_section_info {
        u32 OffsetFromZeroForSectionStart;
-- 
1.7.9.5

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

Reply via email to