aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/init.c')
-rw-r--r--drivers/net/wireless/mwifiex/init.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 9f44fda19db9..58e151edfa09 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -447,17 +447,16 @@ static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
447} 447}
448 448
449/* 449/*
450 * This function frees the adapter structure. 450 * This function performs cleanup for adapter structure.
451 * 451 *
452 * The freeing operation is done recursively, by canceling all 452 * The cleanup is done recursively, by canceling all pending
453 * pending commands, freeing the member buffers previously 453 * commands, freeing the member buffers previously allocated
454 * allocated (command buffers, scan table buffer, sleep confirm 454 * (command buffers, scan table buffer, sleep confirm command
455 * command buffer), stopping the timers and calling the cleanup 455 * buffer), stopping the timers and calling the cleanup routines
456 * routines for every interface, before the actual adapter 456 * for every interface.
457 * structure is freed.
458 */ 457 */
459static void 458static void
460mwifiex_free_adapter(struct mwifiex_adapter *adapter) 459mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
461{ 460{
462 if (!adapter) { 461 if (!adapter) {
463 pr_err("%s: adapter is NULL\n", __func__); 462 pr_err("%s: adapter is NULL\n", __func__);
@@ -733,8 +732,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
733 } 732 }
734 } 733 }
735 734
736 /* Free adapter structure */ 735 mwifiex_adapter_cleanup(adapter);
737 mwifiex_free_adapter(adapter);
738 736
739 spin_unlock_irqrestore(&adapter->mwifiex_lock, flags); 737 spin_unlock_irqrestore(&adapter->mwifiex_lock, flags);
740 738