diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-20 18:26:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-20 18:26:55 -0400 |
commit | 4fe9db37104f833972486355fe86d7dcd29279b5 (patch) | |
tree | a946ecfff6f0f4eef92bd4a457a7f567d37f4526 | |
parent | d63123fc5084d5e38074ad8fb3f08a39747bcea6 (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>
-rw-r--r-- | drivers/staging/csr/csr_framework_ext.c | 34 | ||||
-rw-r--r-- | drivers/staging/csr/csr_framework_ext.h | 29 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_card_sdio.c | 34 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c | 2 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_download.c | 15 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_dump.c | 12 | ||||
-rw-r--r-- | drivers/staging/csr/csr_wifi_hip_xbv.c | 7 | ||||
-rw-r--r-- | drivers/staging/csr/io.c | 4 |
8 files changed, 30 insertions, 107 deletions
diff --git a/drivers/staging/csr/csr_framework_ext.c b/drivers/staging/csr/csr_framework_ext.c index 7a0d660007fd..22345e80467f 100644 --- a/drivers/staging/csr/csr_framework_ext.c +++ b/drivers/staging/csr/csr_framework_ext.c | |||
@@ -196,23 +196,6 @@ EXPORT_SYMBOL_GPL(CsrMemAlloc); | |||
196 | 196 | ||
197 | /*----------------------------------------------------------------------------* | 197 | /*----------------------------------------------------------------------------* |
198 | * NAME | 198 | * NAME |
199 | * CsrMemFree | ||
200 | * | ||
201 | * DESCRIPTION | ||
202 | * Free dynamic allocated memory. | ||
203 | * | ||
204 | * RETURNS | ||
205 | * void | ||
206 | * | ||
207 | *----------------------------------------------------------------------------*/ | ||
208 | void CsrMemFree(void *pointer) | ||
209 | { | ||
210 | kfree(pointer); | ||
211 | } | ||
212 | EXPORT_SYMBOL_GPL(CsrMemFree); | ||
213 | |||
214 | /*----------------------------------------------------------------------------* | ||
215 | * NAME | ||
216 | * CsrMemAllocDma | 199 | * CsrMemAllocDma |
217 | * | 200 | * |
218 | * DESCRIPTION | 201 | * DESCRIPTION |
@@ -228,20 +211,3 @@ void *CsrMemAllocDma(size_t size) | |||
228 | return kmalloc(size, GFP_KERNEL | GFP_DMA); | 211 | return kmalloc(size, GFP_KERNEL | GFP_DMA); |
229 | } | 212 | } |
230 | EXPORT_SYMBOL_GPL(CsrMemAllocDma); | 213 | EXPORT_SYMBOL_GPL(CsrMemAllocDma); |
231 | |||
232 | /*----------------------------------------------------------------------------* | ||
233 | * NAME | ||
234 | * CsrMemFreeDma | ||
235 | * | ||
236 | * DESCRIPTION | ||
237 | * Free DMA capable dynamic allocated memory. | ||
238 | * | ||
239 | * RETURNS | ||
240 | * void | ||
241 | * | ||
242 | *----------------------------------------------------------------------------*/ | ||
243 | void CsrMemFreeDma(void *pointer) | ||
244 | { | ||
245 | kfree(pointer); | ||
246 | } | ||
247 | EXPORT_SYMBOL_GPL(CsrMemFreeDma); | ||
diff --git a/drivers/staging/csr/csr_framework_ext.h b/drivers/staging/csr/csr_framework_ext.h index 46689c173c6f..a3fc15299075 100644 --- a/drivers/staging/csr/csr_framework_ext.h +++ b/drivers/staging/csr/csr_framework_ext.h | |||
@@ -285,19 +285,6 @@ void *CsrMemCalloc(size_t numberOfElements, size_t elementSize); | |||
285 | 285 | ||
286 | /*----------------------------------------------------------------------------* | 286 | /*----------------------------------------------------------------------------* |
287 | * NAME | 287 | * NAME |
288 | * CsrMemFree | ||
289 | * | ||
290 | * DESCRIPTION | ||
291 | * Free dynamic allocated memory. | ||
292 | * | ||
293 | * RETURNS | ||
294 | * void | ||
295 | * | ||
296 | *----------------------------------------------------------------------------*/ | ||
297 | void CsrMemFree(void *pointer); | ||
298 | |||
299 | /*----------------------------------------------------------------------------* | ||
300 | * NAME | ||
301 | * CsrMemAllocDma | 288 | * CsrMemAllocDma |
302 | * | 289 | * |
303 | * DESCRIPTION | 290 | * DESCRIPTION |
@@ -317,18 +304,6 @@ void *CsrMemAllocDma(size_t size); | |||
317 | #endif | 304 | #endif |
318 | 305 | ||
319 | 306 | ||
320 | /*----------------------------------------------------------------------------* | ||
321 | * NAME | ||
322 | * CsrMemFreeDma | ||
323 | * | ||
324 | * DESCRIPTION | ||
325 | * Free dynamic memory allocated by CsrMemAllocDma. | ||
326 | * | ||
327 | * RETURNS | ||
328 | * void | ||
329 | * | ||
330 | *----------------------------------------------------------------------------*/ | ||
331 | void CsrMemFreeDma(void *pointer); | ||
332 | #else | 307 | #else |
333 | 308 | ||
334 | #include "csr_pmem.h" | 309 | #include "csr_pmem.h" |
@@ -337,12 +312,8 @@ void CsrMemFreeDma(void *pointer); | |||
337 | 312 | ||
338 | #define CsrMemCalloc(numberOfElements, elementSize) CsrPmemDebugAlloc((numberOfElements * elementSize), CSR_PMEM_DEBUG_TYPE_MEM_CALLOC, __FILE__, __LINE__) | 313 | #define CsrMemCalloc(numberOfElements, elementSize) CsrPmemDebugAlloc((numberOfElements * elementSize), CSR_PMEM_DEBUG_TYPE_MEM_CALLOC, __FILE__, __LINE__) |
339 | 314 | ||
340 | #define CsrMemFree(ptr) CsrPmemDebugFree(ptr,CSR_PMEM_DEBUG_TYPE_MEM_ALLOC, __FILE__, __LINE__) | ||
341 | |||
342 | #define CsrMemAllocDma(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__) | 315 | #define CsrMemAllocDma(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__) |
343 | 316 | ||
344 | #define CsrMemFreeDma(ptr) CsrPmemDebugFree(ptr, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__) | ||
345 | |||
346 | #endif | 317 | #endif |
347 | 318 | ||
348 | 319 | ||
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio.c b/drivers/staging/csr/csr_wifi_hip_card_sdio.c index 78fc5c47b614..4f2d2e3e45bb 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 @@ | |||
21 | * | 21 | * |
22 | * --------------------------------------------------------------------------- | 22 | * --------------------------------------------------------------------------- |
23 | */ | 23 | */ |
24 | #include <linux/slab.h> | ||
24 | #include "csr_wifi_hip_unifi.h" | 25 | #include "csr_wifi_hip_unifi.h" |
25 | #include "csr_wifi_hip_conversions.h" | 26 | #include "csr_wifi_hip_conversions.h" |
26 | #include "csr_wifi_hip_unifiversion.h" | 27 | #include "csr_wifi_hip_unifiversion.h" |
@@ -1793,37 +1794,22 @@ static void card_free_memory_resources(card_t *card) | |||
1793 | unifi_cancel_pending_signals(card); | 1794 | unifi_cancel_pending_signals(card); |
1794 | 1795 | ||
1795 | 1796 | ||
1796 | if (card->to_host_data) | 1797 | kfree(card->to_host_data); |
1797 | { | 1798 | card->to_host_data = NULL; |
1798 | CsrMemFree(card->to_host_data); | ||
1799 | card->to_host_data = NULL; | ||
1800 | } | ||
1801 | 1799 | ||
1802 | if (card->from_host_data) | 1800 | kfree(card->from_host_data); |
1803 | { | 1801 | card->from_host_data = NULL; |
1804 | CsrMemFree(card->from_host_data); | ||
1805 | card->from_host_data = NULL; | ||
1806 | } | ||
1807 | 1802 | ||
1808 | /* free the memory for slot host tag mapping array */ | 1803 | /* free the memory for slot host tag mapping array */ |
1809 | if (card->fh_slot_host_tag_record) | 1804 | kfree(card->fh_slot_host_tag_record); |
1810 | { | 1805 | card->fh_slot_host_tag_record = NULL; |
1811 | CsrMemFree(card->fh_slot_host_tag_record); | ||
1812 | card->fh_slot_host_tag_record = NULL; | ||
1813 | } | ||
1814 | 1806 | ||
1815 | if (card->fh_buffer.buf) | 1807 | kfree(card->fh_buffer.buf); |
1816 | { | ||
1817 | CsrMemFreeDma(card->fh_buffer.buf); | ||
1818 | } | ||
1819 | card->fh_buffer.ptr = card->fh_buffer.buf = NULL; | 1808 | card->fh_buffer.ptr = card->fh_buffer.buf = NULL; |
1820 | card->fh_buffer.bufsize = 0; | 1809 | card->fh_buffer.bufsize = 0; |
1821 | card->fh_buffer.count = 0; | 1810 | card->fh_buffer.count = 0; |
1822 | 1811 | ||
1823 | if (card->th_buffer.buf) | 1812 | kfree(card->th_buffer.buf); |
1824 | { | ||
1825 | CsrMemFreeDma(card->th_buffer.buf); | ||
1826 | } | ||
1827 | card->th_buffer.ptr = card->th_buffer.buf = NULL; | 1813 | card->th_buffer.ptr = card->th_buffer.buf = NULL; |
1828 | card->th_buffer.bufsize = 0; | 1814 | card->th_buffer.bufsize = 0; |
1829 | card->th_buffer.count = 0; | 1815 | card->th_buffer.count = 0; |
@@ -1984,7 +1970,7 @@ void unifi_free_card(card_t *card) | |||
1984 | unifi_coredump_free(card); /* free anyway to prevent memory leak */ | 1970 | unifi_coredump_free(card); /* free anyway to prevent memory leak */ |
1985 | } | 1971 | } |
1986 | 1972 | ||
1987 | CsrMemFree(card); | 1973 | kfree(card); |
1988 | 1974 | ||
1989 | func_exit(); | 1975 | func_exit(); |
1990 | } /* unifi_free_card() */ | 1976 | } /* unifi_free_card() */ |
diff --git a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c index 9fdd577bb171..9789579f1fc4 100644 --- a/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c +++ b/drivers/staging/csr/csr_wifi_hip_card_sdio_intr.c | |||
@@ -1817,7 +1817,7 @@ static CsrResult process_bulk_data_command(card_t *card, const u8 *cmdptr, | |||
1817 | /* moving this check before we clear host data slot */ | 1817 | /* moving this check before we clear host data slot */ |
1818 | if ((len != 0) && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3)) | 1818 | if ((len != 0) && (dir == UNIFI_SDIO_WRITE) && (((ptrdiff_t)bdslot->os_data_ptr + offset) & 3)) |
1819 | { | 1819 | { |
1820 | CsrMemFreeDma(host_bulk_data_slot); | 1820 | kfree(host_bulk_data_slot); |
1821 | } | 1821 | } |
1822 | #endif | 1822 | #endif |
1823 | 1823 | ||
diff --git a/drivers/staging/csr/csr_wifi_hip_download.c b/drivers/staging/csr/csr_wifi_hip_download.c index 15da98e2ca9e..1a1dfb628450 100644 --- a/drivers/staging/csr/csr_wifi_hip_download.c +++ b/drivers/staging/csr/csr_wifi_hip_download.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * | 17 | * |
18 | * --------------------------------------------------------------------------- | 18 | * --------------------------------------------------------------------------- |
19 | */ | 19 | */ |
20 | #include <linux/slab.h> | ||
20 | #include "csr_wifi_hip_unifi.h" | 21 | #include "csr_wifi_hip_unifi.h" |
21 | #include "csr_wifi_hip_unifiversion.h" | 22 | #include "csr_wifi_hip_unifiversion.h" |
22 | #include "csr_wifi_hip_card.h" | 23 | #include "csr_wifi_hip_card.h" |
@@ -270,7 +271,7 @@ static CsrResult do_patch_convert_download(card_t *card, void *dlpriv, xbv1_t *p | |||
270 | /* Download the patch */ | 271 | /* Download the patch */ |
271 | unifi_info(card->ospriv, "Downloading converted f/w as patch\n"); | 272 | unifi_info(card->ospriv, "Downloading converted f/w as patch\n"); |
272 | r = unifi_dl_patch(card, desc, sym.obj); | 273 | r = unifi_dl_patch(card, desc, sym.obj); |
273 | CsrMemFree(pfw); | 274 | kfree(pfw); |
274 | unifi_fw_close_buffer(card->ospriv, desc); | 275 | unifi_fw_close_buffer(card->ospriv, desc); |
275 | 276 | ||
276 | if (r != CSR_RESULT_SUCCESS) | 277 | if (r != CSR_RESULT_SUCCESS) |
@@ -347,7 +348,7 @@ CsrResult unifi_dl_firmware(card_t *card, void *dlpriv) | |||
347 | { | 348 | { |
348 | unifi_error(card->ospriv, "File type is %s, expected firmware.\n", | 349 | unifi_error(card->ospriv, "File type is %s, expected firmware.\n", |
349 | fwinfo->mode == xbv_patch?"patch" : "unknown"); | 350 | fwinfo->mode == xbv_patch?"patch" : "unknown"); |
350 | CsrMemFree(fwinfo); | 351 | kfree(fwinfo); |
351 | return CSR_WIFI_HIP_RESULT_INVALID_VALUE; | 352 | return CSR_WIFI_HIP_RESULT_INVALID_VALUE; |
352 | } | 353 | } |
353 | 354 | ||
@@ -372,7 +373,7 @@ CsrResult unifi_dl_firmware(card_t *card, void *dlpriv) | |||
372 | r = CSR_WIFI_HIP_RESULT_INVALID_VALUE; | 373 | r = CSR_WIFI_HIP_RESULT_INVALID_VALUE; |
373 | } | 374 | } |
374 | 375 | ||
375 | CsrMemFree(fwinfo); | 376 | kfree(fwinfo); |
376 | func_exit_r(r); | 377 | func_exit_r(r); |
377 | return r; | 378 | return r; |
378 | } /* unifi_dl_firmware() */ | 379 | } /* unifi_dl_firmware() */ |
@@ -426,7 +427,7 @@ CsrResult unifi_dl_patch(card_t *card, void *dlpriv, u32 boot_ctrl) | |||
426 | r = xbv1_parse(card, unifi_fw_read, dlpriv, fwinfo); | 427 | r = xbv1_parse(card, unifi_fw_read, dlpriv, fwinfo); |
427 | if (r != CSR_RESULT_SUCCESS || fwinfo->mode != xbv_patch) | 428 | if (r != CSR_RESULT_SUCCESS || fwinfo->mode != xbv_patch) |
428 | { | 429 | { |
429 | CsrMemFree(fwinfo); | 430 | kfree(fwinfo); |
430 | unifi_error(card->ospriv, "Failed to read in patch file\n"); | 431 | unifi_error(card->ospriv, "Failed to read in patch file\n"); |
431 | func_exit(); | 432 | func_exit(); |
432 | return CSR_WIFI_HIP_RESULT_INVALID_VALUE; | 433 | return CSR_WIFI_HIP_RESULT_INVALID_VALUE; |
@@ -441,7 +442,7 @@ CsrResult unifi_dl_patch(card_t *card, void *dlpriv, u32 boot_ctrl) | |||
441 | { | 442 | { |
442 | unifi_error(card->ospriv, "Wrong patch file for chip (chip = %lu, file = %lu)\n", | 443 | unifi_error(card->ospriv, "Wrong patch file for chip (chip = %lu, file = %lu)\n", |
443 | card->build_id, fwinfo->build_id); | 444 | card->build_id, fwinfo->build_id); |
444 | CsrMemFree(fwinfo); | 445 | kfree(fwinfo); |
445 | #ifndef CSR_WIFI_IGNORE_PATCH_VERSION_MISMATCH | 446 | #ifndef CSR_WIFI_IGNORE_PATCH_VERSION_MISMATCH |
446 | func_exit(); | 447 | func_exit(); |
447 | return CSR_WIFI_HIP_RESULT_INVALID_VALUE; | 448 | return CSR_WIFI_HIP_RESULT_INVALID_VALUE; |
@@ -458,7 +459,7 @@ CsrResult unifi_dl_patch(card_t *card, void *dlpriv, u32 boot_ctrl) | |||
458 | unifi_error(card->ospriv, "Failed to patch image\n"); | 459 | unifi_error(card->ospriv, "Failed to patch image\n"); |
459 | } | 460 | } |
460 | 461 | ||
461 | CsrMemFree(fwinfo); | 462 | kfree(fwinfo); |
462 | 463 | ||
463 | func_exit_r(r); | 464 | func_exit_r(r); |
464 | return r; | 465 | return r; |
@@ -720,7 +721,7 @@ static CsrResult send_ptdl_to_unifi(card_t *card, void *dlpriv, | |||
720 | } | 721 | } |
721 | } | 722 | } |
722 | 723 | ||
723 | CsrMemFreeDma(buf); | 724 | kfree(buf); |
724 | 725 | ||
725 | if (r != CSR_RESULT_SUCCESS && r != CSR_WIFI_HIP_RESULT_NO_DEVICE) | 726 | if (r != CSR_RESULT_SUCCESS && r != CSR_WIFI_HIP_RESULT_NO_DEVICE) |
726 | { | 727 | { |
diff --git a/drivers/staging/csr/csr_wifi_hip_dump.c b/drivers/staging/csr/csr_wifi_hip_dump.c index 0d1f9df24114..350d9d204488 100644 --- a/drivers/staging/csr/csr_wifi_hip_dump.c +++ b/drivers/staging/csr/csr_wifi_hip_dump.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * | 17 | * |
18 | * --------------------------------------------------------------------------- | 18 | * --------------------------------------------------------------------------- |
19 | */ | 19 | */ |
20 | #include <linux/slab.h> | ||
20 | #include "csr_wifi_hip_unifi.h" | 21 | #include "csr_wifi_hip_unifi.h" |
21 | #include "csr_wifi_hip_unifiversion.h" | 22 | #include "csr_wifi_hip_unifiversion.h" |
22 | #include "csr_wifi_hip_card.h" | 23 | #include "csr_wifi_hip_card.h" |
@@ -696,7 +697,7 @@ coredump_buffer* new_coredump_node(void *ospriv, coredump_buffer *prevnode) | |||
696 | { | 697 | { |
697 | for (i = 0; newnode->zone[i] != NULL; i++) | 698 | for (i = 0; newnode->zone[i] != NULL; i++) |
698 | { | 699 | { |
699 | CsrMemFree(newnode->zone[i]); | 700 | kfree(newnode->zone[i]); |
700 | newnode->zone[i] = NULL; | 701 | newnode->zone[i] = NULL; |
701 | } | 702 | } |
702 | } | 703 | } |
@@ -844,11 +845,8 @@ void unifi_coredump_free(card_t *card) | |||
844 | /* Free payload zones */ | 845 | /* Free payload zones */ |
845 | for (j = 0; j < HIP_CDUMP_NUM_ZONES; j++) | 846 | for (j = 0; j < HIP_CDUMP_NUM_ZONES; j++) |
846 | { | 847 | { |
847 | if (node->zone[j] != NULL) | 848 | kfree(node->zone[j]); |
848 | { | 849 | node->zone[j] = NULL; |
849 | CsrMemFree(node->zone[j]); | ||
850 | node->zone[j] = NULL; | ||
851 | } | ||
852 | } | 850 | } |
853 | 851 | ||
854 | /* Detach */ | 852 | /* Detach */ |
@@ -856,7 +854,7 @@ void unifi_coredump_free(card_t *card) | |||
856 | node = node->next; | 854 | node = node->next; |
857 | 855 | ||
858 | /* Free header */ | 856 | /* Free header */ |
859 | CsrMemFree(del_node); | 857 | kfree(del_node); |
860 | i++; | 858 | i++; |
861 | } while ((node != NULL) && (node != card->dump_buf)); | 859 | } while ((node != NULL) && (node != card->dump_buf)); |
862 | 860 | ||
diff --git a/drivers/staging/csr/csr_wifi_hip_xbv.c b/drivers/staging/csr/csr_wifi_hip_xbv.c index c503365581ff..3016e63e212c 100644 --- a/drivers/staging/csr/csr_wifi_hip_xbv.c +++ b/drivers/staging/csr/csr_wifi_hip_xbv.c | |||
@@ -19,6 +19,7 @@ | |||
19 | * | 19 | * |
20 | * --------------------------------------------------------------------------- | 20 | * --------------------------------------------------------------------------- |
21 | */ | 21 | */ |
22 | #include <linux/slab.h> | ||
22 | 23 | ||
23 | #ifdef CSR_WIFI_XBV_TEST | 24 | #ifdef CSR_WIFI_XBV_TEST |
24 | /* Standalone test harness */ | 25 | /* Standalone test harness */ |
@@ -959,7 +960,7 @@ s32 xbv1_read_slut(card_t *card, fwreadfn_t readfn, void *dlpriv, xbv1_t *fwinfo | |||
959 | * | 960 | * |
960 | * Returns: | 961 | * Returns: |
961 | * Pointer to firmware image, or NULL on error. Caller must free this | 962 | * Pointer to firmware image, or NULL on error. Caller must free this |
962 | * buffer via CsrMemFree() once it's finished with. | 963 | * buffer via kfree() once it's finished with. |
963 | * | 964 | * |
964 | * Notes: | 965 | * Notes: |
965 | * The input fw_buf should have been checked via xbv1_parse prior to | 966 | * The input fw_buf should have been checked via xbv1_parse prior to |
@@ -1021,7 +1022,7 @@ void* xbv_to_patch(card_t *card, fwreadfn_t readfn, | |||
1021 | patch_buf = (void *)CsrMemAlloc(patch_buf_size); | 1022 | patch_buf = (void *)CsrMemAlloc(patch_buf_size); |
1022 | if (!patch_buf) | 1023 | if (!patch_buf) |
1023 | { | 1024 | { |
1024 | CsrMemFree(rdbuf); | 1025 | kfree(rdbuf); |
1025 | unifi_error(NULL, "Can't malloc buffer for patch conversion\n"); | 1026 | unifi_error(NULL, "Can't malloc buffer for patch conversion\n"); |
1026 | return NULL; | 1027 | return NULL; |
1027 | } | 1028 | } |
@@ -1067,7 +1068,7 @@ void* xbv_to_patch(card_t *card, fwreadfn_t readfn, | |||
1067 | { | 1068 | { |
1068 | *size = patch_offs; | 1069 | *size = patch_offs; |
1069 | } | 1070 | } |
1070 | CsrMemFree(rdbuf); | 1071 | kfree(rdbuf); |
1071 | 1072 | ||
1072 | return patch_buf; | 1073 | return patch_buf; |
1073 | } | 1074 | } |
diff --git a/drivers/staging/csr/io.c b/drivers/staging/csr/io.c index 65b8895a8a87..38b5f7ee6486 100644 --- a/drivers/staging/csr/io.c +++ b/drivers/staging/csr/io.c | |||
@@ -107,7 +107,7 @@ static CsrResult signal_buffer_init(unifi_priv_t * priv, int size) | |||
107 | for(j=0;j<i;j++) | 107 | for(j=0;j<i;j++) |
108 | { | 108 | { |
109 | priv->rxSignalBuffer.rx_buff[j].sig_len=0; | 109 | priv->rxSignalBuffer.rx_buff[j].sig_len=0; |
110 | CsrMemFree(priv->rxSignalBuffer.rx_buff[j].bufptr); | 110 | kfree(priv->rxSignalBuffer.rx_buff[j].bufptr); |
111 | priv->rxSignalBuffer.rx_buff[j].bufptr = NULL; | 111 | priv->rxSignalBuffer.rx_buff[j].bufptr = NULL; |
112 | } | 112 | } |
113 | func_exit(); | 113 | func_exit(); |
@@ -126,7 +126,7 @@ static void signal_buffer_free(unifi_priv_t * priv, int size) | |||
126 | for(i=0; i<size; i++) | 126 | for(i=0; i<size; i++) |
127 | { | 127 | { |
128 | priv->rxSignalBuffer.rx_buff[i].sig_len=0; | 128 | priv->rxSignalBuffer.rx_buff[i].sig_len=0; |
129 | CsrMemFree(priv->rxSignalBuffer.rx_buff[i].bufptr); | 129 | kfree(priv->rxSignalBuffer.rx_buff[i].bufptr); |
130 | priv->rxSignalBuffer.rx_buff[i].bufptr = NULL; | 130 | priv->rxSignalBuffer.rx_buff[i].bufptr = NULL; |
131 | } | 131 | } |
132 | } | 132 | } |