aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/csr/csr_wifi_hip_card_sdio.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 15:26:55 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 15:26:55 -0700
commit4fe9db37104f833972486355fe86d7dcd29279b5 (patch)
treea946ecfff6f0f4eef92bd4a457a7f567d37f4526 /drivers/staging/csr/csr_wifi_hip_card_sdio.c
parentd63123fc5084d5e38074ad8fb3f08a39747bcea6 (diff)
staging: csr: remove CsrMemFree() and CsrMemFreeDma()
They were just wrappers around kfree() so call that instead. Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com> Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com> Cc: Riku Mettälä <riku.mettala@bluegiga.com> Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/csr/csr_wifi_hip_card_sdio.c')
-rw-r--r--drivers/staging/csr/csr_wifi_hip_card_sdio.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio.c b/drivers/staging/csr/csr_wifi_hip_card_sdio.c
index 78fc5c47b61..4f2d2e3e45b 100644
--- a/drivers/staging/csr/csr_wifi_hip_card_sdio.c
+++ b/drivers/staging/csr/csr_wifi_hip_card_sdio.c
@@ -21,6 +21,7 @@
*
* ---------------------------------------------------------------------------
*/
+#include <linux/slab.h>
#include "csr_wifi_hip_unifi.h"
#include "csr_wifi_hip_conversions.h"
#include "csr_wifi_hip_unifiversion.h"
@@ -1793,37 +1794,22 @@ static void card_free_memory_resources(card_t *card)
unifi_cancel_pending_signals(card);
- if (card->to_host_data)
- {
- CsrMemFree(card->to_host_data);
- card->to_host_data = NULL;
- }
+ kfree(card->to_host_data);
+ card->to_host_data = NULL;
- if (card->from_host_data)
- {
- CsrMemFree(card->from_host_data);
- card->from_host_data = NULL;
- }
+ kfree(card->from_host_data);
+ card->from_host_data = NULL;
/* free the memory for slot host tag mapping array */
- if (card->fh_slot_host_tag_record)
- {
- CsrMemFree(card->fh_slot_host_tag_record);
- card->fh_slot_host_tag_record = NULL;
- }
+ kfree(card->fh_slot_host_tag_record);
+ card->fh_slot_host_tag_record = NULL;
- if (card->fh_buffer.buf)
- {
- CsrMemFreeDma(card->fh_buffer.buf);
- }
+ kfree(card->fh_buffer.buf);
card->fh_buffer.ptr = card->fh_buffer.buf = NULL;
card->fh_buffer.bufsize = 0;
card->fh_buffer.count = 0;
- if (card->th_buffer.buf)
- {
- CsrMemFreeDma(card->th_buffer.buf);
- }
+ kfree(card->th_buffer.buf);
card->th_buffer.ptr = card->th_buffer.buf = NULL;
card->th_buffer.bufsize = 0;
card->th_buffer.count = 0;
@@ -1984,7 +1970,7 @@ void unifi_free_card(card_t *card)
unifi_coredump_free(card); /* free anyway to prevent memory leak */
}
- CsrMemFree(card);
+ kfree(card);
func_exit();
} /* unifi_free_card() */