staging: wilc1000: remove function pointer wlan_stop
authorGlen Lee <glen.lee@atmel.com>
Thu, 1 Oct 2015 07:03:34 +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_stop and just call
the function wilc_wlan_stop. 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/linux_wlan.c
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan.h
drivers/staging/wilc1000/wilc_wlan_if.h

index f515fcab56153d2af54e8bc6264af049f2ba88d5..245357e0bd4daf8a482da6a8c2f3444400de9f44 100644 (file)
@@ -983,10 +983,7 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic)
                PRINT_D(INIT_DBG, "Deinitializing IRQ\n");
                deinit_irq(g_linux_wlan);
 
-               if (&g_linux_wlan->oup != NULL) {
-                       if (g_linux_wlan->oup.wlan_stop != NULL)
-                               g_linux_wlan->oup.wlan_stop();
-               }
+               wilc_wlan_stop();
 
                PRINT_D(INIT_DBG, "Deinitializing WILC Wlan\n");
                wilc_wlan_deinit(nic);
@@ -1322,10 +1319,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
                return 0; /*success*/
 
 _fail_fw_start_:
-               if (&g_linux_wlan->oup != NULL) {
-                       if (g_linux_wlan->oup.wlan_stop != NULL)
-                               g_linux_wlan->oup.wlan_stop();
-               }
+               wilc_wlan_stop();
 
 _fail_irq_enable_:
 #if (defined WILC_SDIO) && (!defined WILC_SDIO_IRQ_GPIO)
index 6e2bf4cd5c5e778173a84f26f0f39cc8a7dcd0b7..745953c6b65101e65b74bdff42478f47034cea4f 100644 (file)
@@ -1581,7 +1581,7 @@ void wilc_wlan_global_reset(void)
        p->hif_func.hif_write_reg(WILC_GLB_RESET_0, 0x0);
        release_bus(RELEASE_ONLY);
 }
-static int wilc_wlan_stop(void)
+int wilc_wlan_stop(void)
 {
        wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
        u32 reg = 0;
@@ -2027,7 +2027,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
        /**
         *      export functions
         **/
-       oup->wlan_stop = wilc_wlan_stop;
        oup->wlan_add_to_tx_que = wilc_wlan_txq_add_net_pkt;
        oup->wlan_handle_tx_que = wilc_wlan_handle_txq;
        oup->wlan_handle_rx_isr = wilc_handle_isr;
index 15ae9aeeacf49bb2a862e8333584a7703fdabf75..b32ba4f210b2f2be4de0c2faccd4b925113447aa 100644 (file)
@@ -307,4 +307,5 @@ typedef struct {
 
 int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size);
 int wilc_wlan_start(void);
+int wilc_wlan_stop(void);
 #endif
index e752092f4d400dd0c0fece62e5593f3561187d64..9e749c7397e2e33bf51488ad25c3511291831980 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_stop)(void);
        int (*wlan_add_to_tx_que)(void *, u8 *, u32, wilc_tx_complete_func_t);
        int (*wlan_handle_tx_que)(u32 *);
        void (*wlan_handle_rx_isr)(void);