]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: bcm: Remove typedef for _TARGET_PARAMS and call directly.
authorKevin McKinney <klmckinney1@gmail.com>
Mon, 17 Dec 2012 22:35:20 +0000 (17:35 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Jan 2013 18:54:01 +0000 (10:54 -0800)
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>
drivers/staging/bcm/Adapter.h
drivers/staging/bcm/InterfaceDld.c
drivers/staging/bcm/Misc.c
drivers/staging/bcm/target_params.h

index f13afe7c893719c4f8634b6993131132ed6afd2d..6e43c61c72e82ff7cc842ce3d6023d23f0c9afa9 100644 (file)
@@ -288,7 +288,7 @@ struct bcm_mini_adapter {
        wait_queue_head_t       ioctl_fw_dnld_wait_queue;
        BOOLEAN                 waiting_to_fw_download_done;
        pid_t                   fw_download_process_pid;
-       PSTARGETPARAMS          pstargetparams;
+       struct bcm_target_params *pstargetparams;
        BOOLEAN                 device_removed;
        BOOLEAN                 DeviceAccess;
        BOOLEAN                 bIsAutoCorrectEnabled;
index 87117a797d5bff1b78efec79d342eb133f010df8..64ea6edb9dc2b8c39c260ee9eeb204aead27afc3 100644 (file)
@@ -138,12 +138,12 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
        B_UINT32 value = 0;
 
        if (Adapter->pstargetparams == NULL) {
-               Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL);
+               Adapter->pstargetparams = kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL);
                if (Adapter->pstargetparams == NULL)
                        return -ENOMEM;
        }
 
-       if (psFwInfo->u32FirmwareLength != sizeof(STARGETPARAMS))
+       if (psFwInfo->u32FirmwareLength != sizeof(struct bcm_target_params))
                return -EIO;
 
        retval = copy_from_user(Adapter->pstargetparams, psFwInfo->pvMappedFirmwareAddress, psFwInfo->u32FirmwareLength);
@@ -195,7 +195,7 @@ static int bcm_download_config_file(struct bcm_mini_adapter *Adapter, struct bcm
                }
        }
 
-       retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams, sizeof(STARGETPARAMS), CONFIG_BEGIN_ADDR);
+       retval = buffDnldVerify(Adapter, (PUCHAR)Adapter->pstargetparams, sizeof(struct bcm_target_params), CONFIG_BEGIN_ADDR);
 
        if (retval)
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "configuration file not downloaded properly");
index c92078e7fe86b321937823fbd0f46c8931eae6cd..21b739af60ba586c424f0d612574c16f57c74206 100644 (file)
@@ -956,7 +956,7 @@ int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter)
        /* Download cfg file */
        status = buffDnldVerify(ps_adapter,
                                (PUCHAR)ps_adapter->pstargetparams,
-                               sizeof(STARGETPARAMS),
+                               sizeof(struct bcm_target_params),
                                CONFIG_BEGIN_ADDR);
        if (status) {
                BCM_DEBUG_PRINT(ps_adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Error downloading CFG file");
@@ -1053,7 +1053,7 @@ static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter)
        if (!buff)
                return -ENOMEM;
 
-       Adapter->pstargetparams = kmalloc(sizeof(STARGETPARAMS), GFP_KERNEL);
+       Adapter->pstargetparams = kmalloc(sizeof(struct bcm_target_params), GFP_KERNEL);
        if (Adapter->pstargetparams == NULL) {
                kfree(buff);
                return -ENOMEM;
@@ -1070,7 +1070,7 @@ static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter)
        len = kernel_read(flp, 0, buff, BUFFER_1K);
        filp_close(flp, NULL);
 
-       if (len != sizeof(STARGETPARAMS)) {
+       if (len != sizeof(struct bcm_target_params)) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Mismatch in Target Param Structure!\n");
                kfree(buff);
                kfree(Adapter->pstargetparams);
@@ -1082,7 +1082,7 @@ static int bcm_parse_target_params(struct bcm_mini_adapter *Adapter)
        /*
         * Values in Adapter->pstargetparams are in network byte order
         */
-       memcpy(Adapter->pstargetparams, buff, sizeof(STARGETPARAMS));
+       memcpy(Adapter->pstargetparams, buff, sizeof(struct bcm_target_params));
        kfree(buff);
        beceem_parse_target_struct(Adapter);
        return STATUS_SUCCESS;
index e416dac637d45d5fa13ffb55c920c0017bc453dc..dc45f9ab854d1e424c141c1c0c437df9c841763e 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef TARGET_PARAMS_H
 #define TARGET_PARAMS_H
 
-typedef struct _TARGET_PARAMS {
+struct bcm_target_params {
        u32 m_u32CfgVersion;
        u32 m_u32CenterFrequency;
        u32 m_u32BandAScan;
@@ -52,6 +52,6 @@ typedef struct _TARGET_PARAMS {
         * bit 16-31 Band AMC Data configuration: Bit 16 = 1 \96 Band AMC 2x3 support.
         */
        u32 m_u32BandAMCEnable;
-} stTargetParams, TARGET_PARAMS, *PTARGET_PARAMS, STARGETPARAMS, *PSTARGETPARAMS;
+};
 
 #endif