mwifiex: rename mwifiex_free_adapter() routine in init.c
authorBing Zhao <bzhao@marvell.com>
Thu, 9 May 2013 18:51:23 +0000 (11:51 -0700)
committerChromeBot <chrome-bot@google.com>
Fri, 10 May 2013 22:45:29 +0000 (15:45 -0700)
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.

BUG=None
TEST="iwlist mlan0 scan & sleep 1; rmmod mwifiex_sdio";
"echo scan > /sys/kernel/debug/kmemleak; cat /sys/kernel/debug/kmemleak"

Change-Id: I84933ea996d6d0f6568b2ae915ade5214e25790a
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/50684
Reviewed-by: Paul Stewart <pstew@chromium.org>
drivers/net/wireless/mwifiex/init.c

index a5c1b48..b8ac2b4 100644 (file)
@@ -452,17 +452,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
- * pending commands, freeing the member buffers previously
- * allocated (command buffers, scan table buffer, sleep confirm
- * command buffer), stopping the timers and calling the cleanup
- * routines for every interface, before the actual adapter
- * structure is freed.
+ * The cleanup is done recursively, by canceling all pending
+ * commands, freeing the member buffers previously allocated
+ * (command buffers, scan table buffer, sleep confirm command
+ * buffer), stopping the timers and calling the cleanup routines
+ * for every interface.
  */
 static void
-mwifiex_free_adapter(struct mwifiex_adapter *adapter)
+mwifiex_adapter_cleanup(struct mwifiex_adapter *adapter)
 {
        if (!adapter) {
                pr_err("%s: adapter is NULL\n", __func__);
@@ -704,8 +703,7 @@ mwifiex_shutdown_drv(struct mwifiex_adapter *adapter)
 
        spin_lock_irqsave(&adapter->mwifiex_lock, flags);
 
-       /* Free adapter structure */
-       mwifiex_free_adapter(adapter);
+       mwifiex_adapter_cleanup(adapter);
 
        spin_unlock_irqrestore(&adapter->mwifiex_lock, flags);