staging: wilc1000: remove function pointer wlan_cfg_get
authorGlen Lee <glen.lee@atmel.com>
Thu, 1 Oct 2015 07:03:41 +0000 (16:03 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:59:52 +0000 (11:59 +0200)
This patch removes function pointer wlan_cfg_get and just call
the function wilc_wlan_cfg_get. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/coreconfigurator.c
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan.h
drivers/staging/wilc1000/wilc_wlan_if.h

index 4e9fecae42b8ff29bfd94a4dd79eea041df7affd..74ff763cc6a3197e68bdb6fda1eb5fd726846bef 100644 (file)
@@ -614,19 +614,14 @@ s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
        } else {
                PRINT_D(CORECONFIG_DBG, "Net Dev is initialized\n");
        }
-       if (gpstrWlanOps->wlan_cfg_get == NULL) {
-               PRINT_D(CORECONFIG_DBG, "Set and Get is still not initialized\n");
-               return 1;
-       } else {
-               PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
-       }
        if (u8Mode == GET_CFG) {
                for (counter = 0; counter < u32WIDsCount; counter++) {
                        PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
                                   (counter == u32WIDsCount - 1));
-                       if (!gpstrWlanOps->wlan_cfg_get(!counter,
-                                                       pstrWIDs[counter].u16WIDid,
-                                                       (counter == u32WIDsCount - 1), drvHandler)) {
+                       if (!wilc_wlan_cfg_get(!counter,
+                                              pstrWIDs[counter].u16WIDid,
+                                              (counter == u32WIDsCount - 1),
+                                              drvHandler)) {
                                ret = -1;
                                printk("[Sendconfigpkt]Get Timed out\n");
                                break;
index ad4d64e3a8009dc1a25574c303bf91160229799a..a1e6f6824609f5c664c2f6e2096676d4c0ffc42b 100644 (file)
@@ -1284,7 +1284,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
 
                wilc_bus_set_max_speed();
 
-               if (g_linux_wlan->oup.wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) {
+               if (wilc_wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) {
                        int size;
                        char Firmware_ver[20];
 
index 3687a06f85f0b9dd63c96a4474db85ae4829b15d..ce0f054c3383b1d36bb4792767be61da98fe0bb8 100644 (file)
@@ -1789,7 +1789,7 @@ int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size,
 
        return ret_size;
 }
-static int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler)
+int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler)
 {
        wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
        u32 offset;
@@ -2029,7 +2029,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
        /**
         *      export functions
         **/
-       oup->wlan_cfg_get = wilc_wlan_cfg_get;
        oup->wlan_cfg_get_value = wilc_wlan_cfg_get_val;
 
        oup->wlan_add_mgmt_to_tx_que = wilc_wlan_txq_add_mgmt_pkt;
index be589f0b1027864965e735556c6141e8a04fafd5..eb61db017b8f57dc175a02675dcf302b82c54a7a 100644 (file)
@@ -313,4 +313,5 @@ void wilc_handle_isr(void);
 void wilc_wlan_cleanup(void);
 int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size,
                      int commit, u32 drvHandler);
+int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler);
 #endif
index 88979105e8e57db5f2b50ec15ca7feacde9412ad..31d8983972b18b2c6ba2a2e9e59f92bf7ea584bf 100644 (file)
@@ -122,7 +122,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
 #define WILC_TX_ERR_NO_BUF     (-2)
 
 typedef struct {
-       int (*wlan_cfg_get)(int, u32, int, u32);
        int (*wlan_cfg_get_value)(u32, u8 *, u32);
        int (*wlan_add_mgmt_to_tx_que)(void *, u8 *, u32,
                                       wilc_tx_complete_func_t);