Commit c56ecf5a authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

mwifiex: rename mwifiex_free_adapter() routine in init.c

We have two different static routines with name
mwifiex_free_adapter(). The routine in main.c actually frees the
adapter structure.

We will rename other routine in init.c to mwifiex_adapter_cleanup()
to avoid confusion.
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 78e578c5
...@@ -447,17 +447,16 @@ static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter) ...@@ -447,17 +447,16 @@ static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
} }
/* /*
* This function frees the adapter structure. * This function performs cleanup for adapter structure.
* *
* The freeing operation is done recursively, by canceling all * The cleanup is done recursively, by canceling all pending
* pending commands, freeing the member buffers previously * commands, freeing the member buffers previously allocated
* allocated (command buffers, scan table buffer, sleep confirm * (command buffers, scan table buffer, sleep confirm command
* command buffer), stopping the timers and calling the cleanup * buffer), stopping the timers and calling the cleanup routines
* routines for every interface, before the actual adapter * for every interface.
* structure is freed.
*/ */
static void static void
mwifiex_free_adapter(struct mwifiex_adapter *adapter) mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
{ {
if (!adapter) { if (!adapter) {
pr_err("%s: adapter is NULL\n", __func__); pr_err("%s: adapter is NULL\n", __func__);
...@@ -733,8 +732,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter) ...@@ -733,8 +732,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
} }
} }
/* Free adapter structure */ mwifiex_adapter_cleanup(adapter);
mwifiex_free_adapter(adapter);
spin_unlock_irqrestore(&adapter->mwifiex_lock, flags); spin_unlock_irqrestore(&adapter->mwifiex_lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment