diff options
author | Glen Lee <glen.lee@atmel.com> | 2015-10-27 05:27:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-28 19:11:23 -0400 |
commit | 32dd51bca67a511dc7afb5a95ee33a0f9a85f811 (patch) | |
tree | f4f5332df64233b21f5da5d5ae686a1eb19c47fe | |
parent | 11f4b2eee7725534918ad2dda0cd3ed5ed25d831 (diff) |
staging: wilc1000: wlan_deinitialize_threads: change argument and use wilc
This patch changes function parameter type struct wilc with struct net_device
and use netdev private data member wilc instead of g_linux_wlan.
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/wilc1000/linux_wlan.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 412d5a0b20c0..b6244f93f8f5 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c | |||
@@ -96,7 +96,7 @@ static struct notifier_block g_dev_notifier = { | |||
96 | static struct semaphore close_exit_sync; | 96 | static struct semaphore close_exit_sync; |
97 | 97 | ||
98 | static int wlan_deinit_locks(struct net_device *dev); | 98 | static int wlan_deinit_locks(struct net_device *dev); |
99 | static void wlan_deinitialize_threads(struct wilc *nic); | 99 | static void wlan_deinitialize_threads(struct net_device *dev); |
100 | extern void WILC_WFI_monitor_rx(u8 *buff, u32 size); | 100 | extern void WILC_WFI_monitor_rx(u8 *buff, u32 size); |
101 | extern void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size); | 101 | extern void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size); |
102 | 102 | ||
@@ -919,7 +919,7 @@ void wilc1000_wlan_deinit(struct net_device *dev) | |||
919 | up(&wl->txq_event); | 919 | up(&wl->txq_event); |
920 | 920 | ||
921 | PRINT_D(INIT_DBG, "Deinitializing Threads\n"); | 921 | PRINT_D(INIT_DBG, "Deinitializing Threads\n"); |
922 | wlan_deinitialize_threads(wl); | 922 | wlan_deinitialize_threads(dev); |
923 | 923 | ||
924 | PRINT_D(INIT_DBG, "Deinitializing IRQ\n"); | 924 | PRINT_D(INIT_DBG, "Deinitializing IRQ\n"); |
925 | deinit_irq(dev); | 925 | deinit_irq(dev); |
@@ -1053,18 +1053,23 @@ _fail_2: | |||
1053 | return ret; | 1053 | return ret; |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | static void wlan_deinitialize_threads(struct wilc *nic) | 1056 | static void wlan_deinitialize_threads(struct net_device *dev) |
1057 | { | 1057 | { |
1058 | perInterface_wlan_t *nic; | ||
1059 | struct wilc *wl; | ||
1060 | |||
1061 | nic = netdev_priv(dev); | ||
1062 | wl = nic->wilc; | ||
1058 | 1063 | ||
1059 | g_linux_wlan->close = 1; | 1064 | wl->close = 1; |
1060 | PRINT_D(INIT_DBG, "Deinitializing Threads\n"); | 1065 | PRINT_D(INIT_DBG, "Deinitializing Threads\n"); |
1061 | 1066 | ||
1062 | if (&g_linux_wlan->txq_event != NULL) | 1067 | if (&wl->txq_event != NULL) |
1063 | up(&g_linux_wlan->txq_event); | 1068 | up(&wl->txq_event); |
1064 | 1069 | ||
1065 | if (g_linux_wlan->txq_thread != NULL) { | 1070 | if (wl->txq_thread != NULL) { |
1066 | kthread_stop(g_linux_wlan->txq_thread); | 1071 | kthread_stop(wl->txq_thread); |
1067 | g_linux_wlan->txq_thread = NULL; | 1072 | wl->txq_thread = NULL; |
1068 | } | 1073 | } |
1069 | } | 1074 | } |
1070 | 1075 | ||
@@ -1171,7 +1176,7 @@ _fail_irq_init_: | |||
1171 | deinit_irq(dev); | 1176 | deinit_irq(dev); |
1172 | 1177 | ||
1173 | #endif | 1178 | #endif |
1174 | wlan_deinitialize_threads(wl); | 1179 | wlan_deinitialize_threads(dev); |
1175 | _fail_wilc_wlan_: | 1180 | _fail_wilc_wlan_: |
1176 | wilc_wlan_cleanup(); | 1181 | wilc_wlan_cleanup(); |
1177 | _fail_locks_: | 1182 | _fail_locks_: |