Commit d48a430c authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

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: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0395a61d
...@@ -1604,16 +1604,16 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1604,16 +1604,16 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
break; break;
case IOCTL_BCM_GET_FLASH2X_SECTION_BITMAP: { 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"); 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))) if (copy_from_user(&IoBuffer, argp, sizeof(IOCTL_BUFFER)))
return -EFAULT; return -EFAULT;
if (IoBuffer.OutputLength != sizeof(FLASH2X_BITMAP)) if (IoBuffer.OutputLength != sizeof(struct bcm_flash2x_bitmap))
return -EINVAL; return -EINVAL;
psFlash2xBitMap = kzalloc(sizeof(FLASH2X_BITMAP), GFP_KERNEL); psFlash2xBitMap = kzalloc(sizeof(struct bcm_flash2x_bitmap), GFP_KERNEL);
if (psFlash2xBitMap == NULL) { if (psFlash2xBitMap == NULL) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory is not available"); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Memory is not available");
return -ENOMEM; return -ENOMEM;
...@@ -1634,7 +1634,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) ...@@ -1634,7 +1634,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
BcmGetFlash2xSectionalBitMap(Adapter, psFlash2xBitMap); BcmGetFlash2xSectionalBitMap(Adapter, psFlash2xBitMap);
up(&Adapter->NVMRdmWrmLock); 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); kfree(psFlash2xBitMap);
return -EFAULT; return -EFAULT;
} }
......
...@@ -191,7 +191,7 @@ typedef enum _SECTION_TYPE { ...@@ -191,7 +191,7 @@ typedef enum _SECTION_TYPE {
* Bit [7...3] = Reserved * Bit [7...3] = Reserved
*/ */
typedef struct _FLASH2X_BITMAP { struct bcm_flash2x_bitmap {
unsigned char ISO_IMAGE1; unsigned char ISO_IMAGE1;
unsigned char ISO_IMAGE2; unsigned char ISO_IMAGE2;
unsigned char DSD0; unsigned char DSD0;
...@@ -206,7 +206,7 @@ typedef struct _FLASH2X_BITMAP { ...@@ -206,7 +206,7 @@ typedef struct _FLASH2X_BITMAP {
unsigned char Reserved0; unsigned char Reserved0;
unsigned char Reserved1; unsigned char Reserved1;
unsigned char Reserved2; unsigned char Reserved2;
} FLASH2X_BITMAP, *PFLASH2X_BITMAP; };
struct bcm_time_elapsed { struct bcm_time_elapsed {
unsigned long long ul64TimeElapsedSinceNetEntry; unsigned long long ul64TimeElapsedSinceNetEntry;
......
...@@ -163,7 +163,7 @@ INT BcmInitNVM(struct bcm_mini_adapter *Adapter); ...@@ -163,7 +163,7 @@ INT BcmInitNVM(struct bcm_mini_adapter *Adapter);
INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize); INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize);
BOOLEAN IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, FLASH2X_SECTION_VAL section); 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( INT BcmFlash2xBulkWrite(
struct bcm_mini_adapter *Adapter, struct bcm_mini_adapter *Adapter,
......
...@@ -3064,7 +3064,7 @@ B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset ...@@ -3064,7 +3064,7 @@ B_UINT8 IsOffsetWritable(struct bcm_mini_adapter *Adapter, unsigned int uiOffset
return FALSE; 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); struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
...@@ -3099,7 +3099,7 @@ static int BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap) ...@@ -3099,7 +3099,7 @@ static int BcmDumpFlash2xSectionBitMap(PFLASH2X_BITMAP psFlash2xBitMap)
* Failure:- negative error code * 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; PFLASH2X_CS_INFO psFlash2xCSInfo = Adapter->psFlash2xCSInfo;
FLASH2X_SECTION_VAL uiHighestPriDSD = 0; FLASH2X_SECTION_VAL uiHighestPriDSD = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment