Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: bcm: Remove typedef for _FLASH_CS_INFO and call directly.

This patch removes typedef for _FLASH_CS_INFO, and
changes the name of the struct to bcm_flash_cs_info.
In addition, any calls to typedefs FLASH_CS_INFO, or
*PFLASH_CS_INFO are changed to call the struct
directly.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kevin McKinney and committed by
Greg Kroah-Hartman
168b1400 08391731

+10 -10
+1 -1
drivers/staging/bcm/Adapter.h
··· 367 367 368 368 /* BOOLEAN InterfaceUpStatus; */ 369 369 struct bcm_flash2x_cs_info *psFlash2xCSInfo; 370 - PFLASH_CS_INFO psFlashCSInfo; 370 + struct bcm_flash_cs_info *psFlashCSInfo; 371 371 struct bcm_flash2x_vendor_info *psFlash2xVendorInfo; 372 372 UINT uiFlashBaseAdd; /* Flash start address */ 373 373 UINT uiActiveISOOffset; /* Active ISO offset chosen before f/w download */
+1 -1
drivers/staging/bcm/Bcmchar.c
··· 1789 1789 if (copy_to_user(IoBuffer.OutputBuffer, Adapter->psFlash2xCSInfo, sizeof(struct bcm_flash2x_cs_info))) 1790 1790 return -EFAULT; 1791 1791 } else { 1792 - if (IoBuffer.OutputLength < sizeof(FLASH_CS_INFO)) 1792 + if (IoBuffer.OutputLength < sizeof(struct bcm_flash_cs_info)) 1793 1793 return -EINVAL; 1794 1794 1795 1795 if (copy_to_user(IoBuffer.OutputBuffer, Adapter->psFlashCSInfo, sizeof(struct bcm_flash2x_cs_info)))
+6 -6
drivers/staging/bcm/nvm.c
··· 1978 1978 int BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter, unsigned int uiSectorSize) 1979 1979 { 1980 1980 int Status = -1; 1981 - FLASH_CS_INFO sFlashCsInfo = {0}; 1981 + struct bcm_flash_cs_info sFlashCsInfo = {0}; 1982 1982 unsigned int uiTemp = 0; 1983 1983 unsigned int uiSectorSig = 0; 1984 1984 unsigned int uiCurrentSectorSize = 0; ··· 2228 2228 BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Adapter structure point is NULL"); 2229 2229 return -EINVAL; 2230 2230 } 2231 - psAdapter->psFlashCSInfo = (PFLASH_CS_INFO)kzalloc(sizeof(FLASH_CS_INFO), GFP_KERNEL); 2231 + psAdapter->psFlashCSInfo = (struct bcm_flash_cs_info *)kzalloc(sizeof(struct bcm_flash_cs_info), GFP_KERNEL); 2232 2232 if (psAdapter->psFlashCSInfo == NULL) { 2233 2233 BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_PRINTK, 0, 0, "Can't Allocate memory for Flash 1.x"); 2234 2234 return -ENOMEM; ··· 2381 2381 return STATUS_SUCCESS; 2382 2382 } 2383 2383 2384 - static int ConvertEndianOfCSStructure(PFLASH_CS_INFO psFlashCSInfo) 2384 + static int ConvertEndianOfCSStructure(struct bcm_flash_cs_info *psFlashCSInfo) 2385 2385 { 2386 2386 /* unsigned int Index = 0; */ 2387 2387 psFlashCSInfo->MagicNumber = ntohl(psFlashCSInfo->MagicNumber); ··· 2509 2509 2510 2510 static int BcmGetFlashCSInfo(struct bcm_mini_adapter *Adapter) 2511 2511 { 2512 - /* FLASH_CS_INFO sFlashCsInfo = {0}; */ 2512 + /* struct bcm_flash_cs_info sFlashCsInfo = {0}; */ 2513 2513 2514 2514 #if !defined(BCM_SHM_INTERFACE) || defined(FLASH_DIRECT_ACCESS) 2515 2515 unsigned int value; ··· 2522 2522 2523 2523 Adapter->uiFlashBaseAdd = 0; 2524 2524 Adapter->ulFlashCalStart = 0; 2525 - memset(Adapter->psFlashCSInfo, 0 , sizeof(FLASH_CS_INFO)); 2525 + memset(Adapter->psFlashCSInfo, 0 , sizeof(struct bcm_flash_cs_info)); 2526 2526 memset(Adapter->psFlash2xCSInfo, 0 , sizeof(struct bcm_flash2x_cs_info)); 2527 2527 2528 2528 if (!Adapter->bDDRInitDone) { ··· 2551 2551 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, NVM_RW, DBG_LVL_ALL, "FLASH LAYOUT MAJOR VERSION :%X", uiFlashLayoutMajorVersion); 2552 2552 2553 2553 if (uiFlashLayoutMajorVersion < FLASH_2X_MAJOR_NUMBER) { 2554 - BeceemFlashBulkRead(Adapter, (PUINT)Adapter->psFlashCSInfo, Adapter->ulFlashControlSectionStart, sizeof(FLASH_CS_INFO)); 2554 + BeceemFlashBulkRead(Adapter, (PUINT)Adapter->psFlashCSInfo, Adapter->ulFlashControlSectionStart, sizeof(struct bcm_flash_cs_info)); 2555 2555 ConvertEndianOfCSStructure(Adapter->psFlashCSInfo); 2556 2556 Adapter->ulFlashCalStart = (Adapter->psFlashCSInfo->OffsetFromZeroForCalibrationStart); 2557 2557
+2 -2
drivers/staging/bcm/nvm.h
··· 26 26 unsigned int uiSectorSize; 27 27 } FLASH_SECTOR_INFO, *PFLASH_SECTOR_INFO; 28 28 29 - typedef struct _FLASH_CS_INFO { 29 + struct bcm_flash_cs_info { 30 30 u32 MagicNumber; 31 31 /* let the magic number be 0xBECE-F1A5 - F1A5 for "flas-h" */ 32 32 u32 FlashLayoutVersion; ··· 53 53 u32 IsCDLessDeviceBootSig; 54 54 /* MSC Timeout after reset to switch from MSC to NW Mode */ 55 55 u32 MassStorageTimeout; 56 - } FLASH_CS_INFO, *PFLASH_CS_INFO; 56 + }; 57 57 58 58 #define FLASH2X_TOTAL_SIZE (64 * 1024 * 1024) 59 59 #define DEFAULT_SECTOR_SIZE (64 * 1024)