staging: wilc1000: remove unused semaphore and it's related codes
authorGlen Lee <glen.lee@atmel.com>
Wed, 16 Sep 2015 09:53:25 +0000 (18:53 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2015 04:43:06 +0000 (21:43 -0700)
Variable rxq_event, rxq_wait_event and rxq_wait have the same pointer.

nwi->os_context.rxq_wait_event = (void *)&g_linux_wlan->rxq_event;
g_wlan.rxq_wait = inp->os_context.rxq_wait_event;

They are never aquired(down) since down function was only called in
linux_wlan_rxq_task which was deleted in a previous patch.
So delete variable rxq_event, rxq_wait_event, rxq_wait and it's related codes.

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_wfi_netdevice.h
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan_if.h

index f104a23744e8af93e2bcbe82b3f7cd02940a88db..186e42e5c08737d13ff32bf66ee1478dee57290f 100644 (file)
@@ -1088,10 +1088,6 @@ void wilc1000_wlan_deinit(linux_wlan_t *nic)
                  #endif
                #endif
 
-               /* not sure if the following unlocks are needed or not*/
-               if (&g_linux_wlan->rxq_event != NULL)
-                       up(&g_linux_wlan->rxq_event);
-
                if (&g_linux_wlan->txq_event != NULL)
                        up(&g_linux_wlan->txq_event);
 
@@ -1156,7 +1152,6 @@ int wlan_init_locks(linux_wlan_t *p_nic)
        sema_init(&g_linux_wlan->txq_add_to_head_cs, 1);
 
        sema_init(&g_linux_wlan->txq_event, 0);
-       sema_init(&g_linux_wlan->rxq_event, 0);
 
        sema_init(&g_linux_wlan->cfg_event, 0);
        sema_init(&g_linux_wlan->sync_event, 0);
@@ -1207,7 +1202,6 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic)
        nwi->os_context.rx_buffer_size = LINUX_RX_SIZE;
 #endif
        nwi->os_context.rxq_critical_section = (void *)&g_linux_wlan->rxq_cs;
-       nwi->os_context.rxq_wait_event = (void *)&g_linux_wlan->rxq_event;
        nwi->os_context.cfg_wait_event = (void *)&g_linux_wlan->cfg_event;
 
        nwi->os_func.os_debug = linux_wlan_dbg;
@@ -1282,7 +1276,6 @@ int wlan_initialize_threads(perInterface_wlan_t *nic)
 _fail_2:
        /*De-Initialize 2nd thread*/
        g_linux_wlan->close = 1;
-       up(&g_linux_wlan->rxq_event);
        kthread_stop(g_linux_wlan->rxq_thread);
 
        #if (RX_BH_TYPE == RX_BH_KTHREAD)
@@ -1301,8 +1294,6 @@ static void wlan_deinitialize_threads(linux_wlan_t *nic)
 
        g_linux_wlan->close = 1;
        PRINT_D(INIT_DBG, "Deinitializing Threads\n");
-       if (&g_linux_wlan->rxq_event != NULL)
-               up(&g_linux_wlan->rxq_event);
 
        if (g_linux_wlan->rxq_thread != NULL) {
                kthread_stop(g_linux_wlan->rxq_thread);
index c68df360a3629322cfc3c80718e469dbe0af06c6..c98eab68af2fad1452bea5f71a4b237499d63699 100644 (file)
@@ -187,7 +187,6 @@ typedef struct {
        struct mutex rxq_cs;
        struct mutex hif_cs;
 
-       struct semaphore rxq_event;
        struct semaphore cfg_event;
        struct semaphore sync_event;
        struct semaphore txq_event;
index 1db4cc8b164a88e743b912811bae37bff8edb9db..22310cc6c9535695822b88b9c43ae75ce0b4f92a 100644 (file)
@@ -90,7 +90,6 @@ typedef struct {
        struct rxq_entry_t *rxq_head;
        struct rxq_entry_t *rxq_tail;
        int rxq_entries;
-       void *rxq_wait;
        int rxq_exit;
 
 
@@ -1398,7 +1397,6 @@ _end_:
                                rqe->buffer_size = size;
                                PRINT_D(RX_DBG, "rxq entery Size= %d - Address = %p\n", rqe->buffer_size, rqe->buffer);
                                wilc_wlan_rxq_add(rqe);
-                               up(p->rxq_wait);
                        }
                } else {
 #ifndef MEMORY_STATIC
@@ -2049,7 +2047,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
 
        g_wlan.rxq_lock = inp->os_context.rxq_critical_section;
        g_wlan.txq_wait = inp->os_context.txq_wait_event;
-       g_wlan.rxq_wait = inp->os_context.rxq_wait_event;
        g_wlan.cfg_wait = inp->os_context.cfg_wait_event;
        g_wlan.tx_buffer_size = inp->os_context.tx_buffer_size;
 #if defined (MEMORY_STATIC)
index 3f5aa44b0696d92364103f731515acbf791b67d5..bccfcf9daf5ab7edaaa534d3598f574f56d320ad 100644 (file)
@@ -137,7 +137,6 @@ typedef struct {
        u32 rx_buffer_size;
 #endif
        void *rxq_critical_section;
-       void *rxq_wait_event;
 
        struct semaphore *cfg_wait_event;
 } wilc_wlan_os_context_t;
This page took 0.028388 seconds and 5 git commands to generate.