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

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

This patch removes typedef for _TARGET_PARAMS, and changes
the name of the struct to bcm_target_params. In addition,
any calls to struct "stTargetParams, TARGET_PARAMS,
*PTARGET_PARAMS, STARGETPARAMS, or *PSTARGETPARAMS are
changed to call 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
c8182334 a637f904

+10 -10
+1 -1
drivers/staging/bcm/Adapter.h
··· 288 288 wait_queue_head_t ioctl_fw_dnld_wait_queue; 289 289 BOOLEAN waiting_to_fw_download_done; 290 290 pid_t fw_download_process_pid; 291 - PSTARGETPARAMS pstargetparams; 291 + struct bcm_target_params *pstargetparams; 292 292 BOOLEAN device_removed; 293 293 BOOLEAN DeviceAccess; 294 294 BOOLEAN bIsAutoCorrectEnabled;
+3 -3
drivers/staging/bcm/InterfaceDld.c
··· 138 138 B_UINT32 value = 0; 139 139 140 140 if (Adapter->pstargetparams == NULL) { 141 - Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL); 141 + Adapter->pstargetparams = kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL); 142 142 if (Adapter->pstargetparams == NULL) 143 143 return -ENOMEM; 144 144 } 145 145 146 - if (psFwInfo->u32FirmwareLength != sizeof(STARGETPARAMS)) 146 + if (psFwInfo->u32FirmwareLength != sizeof(struct bcm_target_params)) 147 147 return -EIO; 148 148 149 149 retval = copy_from_user(Adapter->pstargetparams, psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength); ··· 195 195 } 196 196 } 197 197 198 - retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams, sizeof(STARGETPARAMS), CONFIG_BEGIN_ADDR); 198 + retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams, sizeof(struct bcm_target_params), CONFIG_BEGIN_ADDR); 199 199 200 200 if (retval) 201 201 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "configuration file not downloaded properly");
+4 -4
drivers/staging/bcm/Misc.c
··· 956 956 /* Download cfg file */ 957 957 status = buffDnldVerify(ps_adapter, 958 958 (PUCHAR)ps_adapter->pstargetparams, 959 - sizeof(STARGETPARAMS), 959 + sizeof(struct bcm_target_params), 960 960 CONFIG_BEGIN_ADDR); 961 961 if (status) { 962 962 BCM_DEBUG_PRINT(ps_adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Error downloading CFG file"); ··· 1053 1053 if (!buff) 1054 1054 return -ENOMEM; 1055 1055 1056 - Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL); 1056 + Adapter->pstargetparams = kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL); 1057 1057 if (Adapter->pstargetparams == NULL) { 1058 1058 kfree(buff); 1059 1059 return -ENOMEM; ··· 1070 1070 len = kernel_read(flp, 0, buff, BUFFER_1K); 1071 1071 filp_close(flp, NULL); 1072 1072 1073 - if (len != sizeof(STARGETPARAMS)) { 1073 + if (len != sizeof(struct bcm_target_params)) { 1074 1074 BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Mismatch in Target Param Structure!\n"); 1075 1075 kfree(buff); 1076 1076 kfree(Adapter->pstargetparams); ··· 1082 1082 /* 1083 1083 * Values in Adapter->pstargetparams are in network byte order 1084 1084 */ 1085 - memcpy(Adapter->pstargetparams, buff, sizeof(STARGETPARAMS)); 1085 + memcpy(Adapter->pstargetparams, buff, sizeof(struct bcm_target_params)); 1086 1086 kfree(buff); 1087 1087 beceem_parse_target_struct(Adapter); 1088 1088 return STATUS_SUCCESS;
+2 -2
drivers/staging/bcm/target_params.h
··· 1 1 #ifndef TARGET_PARAMS_H 2 2 #define TARGET_PARAMS_H 3 3 4 - typedef struct _TARGET_PARAMS { 4 + struct bcm_target_params { 5 5 u32 m_u32CfgVersion; 6 6 u32 m_u32CenterFrequency; 7 7 u32 m_u32BandAScan; ··· 52 52 * bit 16-31 Band AMC Data configuration: Bit 16 = 1 – Band AMC 2x3 support. 53 53 */ 54 54 u32 m_u32BandAMCEnable; 55 - } stTargetParams, TARGET_PARAMS, *PTARGET_PARAMS, STARGETPARAMS, *PSTARGETPARAMS; 55 + }; 56 56 57 57 #endif