diff options
| -rw-r--r-- | drivers/staging/csr/csr_framework_ext.c | 29 | ||||
| -rw-r--r-- | drivers/staging/csr/csr_framework_ext.h | 23 |
2 files changed, 0 insertions, 52 deletions
diff --git a/drivers/staging/csr/csr_framework_ext.c b/drivers/staging/csr/csr_framework_ext.c index a34d2632ae22..771a3692f670 100644 --- a/drivers/staging/csr/csr_framework_ext.c +++ b/drivers/staging/csr/csr_framework_ext.c | |||
| @@ -149,35 +149,6 @@ EXPORT_SYMBOL_GPL(CsrThreadSleep); | |||
| 149 | 149 | ||
| 150 | /*----------------------------------------------------------------------------* | 150 | /*----------------------------------------------------------------------------* |
| 151 | * NAME | 151 | * NAME |
| 152 | * CsrMemCalloc | ||
| 153 | * | ||
| 154 | * DESCRIPTION | ||
| 155 | * Allocate dynamic memory of a given size calculated as the | ||
| 156 | * numberOfElements times the elementSize. | ||
| 157 | * | ||
| 158 | * RETURNS | ||
| 159 | * Pointer to allocated memory, or NULL in case of failure. | ||
| 160 | * Allocated memory is zero initialised. | ||
| 161 | * | ||
| 162 | *----------------------------------------------------------------------------*/ | ||
| 163 | void *CsrMemCalloc(size_t numberOfElements, size_t elementSize) | ||
| 164 | { | ||
| 165 | void *buf; | ||
| 166 | size_t size; | ||
| 167 | |||
| 168 | size = numberOfElements * elementSize; | ||
| 169 | |||
| 170 | buf = kmalloc(size, GFP_KERNEL); | ||
| 171 | if (buf != NULL) | ||
| 172 | { | ||
| 173 | memset(buf, 0, size); | ||
| 174 | } | ||
| 175 | |||
| 176 | return buf; | ||
| 177 | } | ||
| 178 | |||
| 179 | /*----------------------------------------------------------------------------* | ||
| 180 | * NAME | ||
| 181 | * CsrMemAllocDma | 152 | * CsrMemAllocDma |
| 182 | * | 153 | * |
| 183 | * DESCRIPTION | 154 | * DESCRIPTION |
diff --git a/drivers/staging/csr/csr_framework_ext.h b/drivers/staging/csr/csr_framework_ext.h index 141f2884688f..817369da1f97 100644 --- a/drivers/staging/csr/csr_framework_ext.h +++ b/drivers/staging/csr/csr_framework_ext.h | |||
| @@ -244,27 +244,6 @@ void CsrThreadSleep(u16 sleepTimeInMs); | |||
| 244 | #ifndef CSR_PMEM_DEBUG_ENABLE | 244 | #ifndef CSR_PMEM_DEBUG_ENABLE |
| 245 | /*----------------------------------------------------------------------------* | 245 | /*----------------------------------------------------------------------------* |
| 246 | * NAME | 246 | * NAME |
| 247 | * CsrMemCalloc | ||
| 248 | * | ||
| 249 | * DESCRIPTION | ||
| 250 | * Allocate dynamic memory of a given size calculated as the | ||
| 251 | * numberOfElements times the elementSize. | ||
| 252 | * | ||
| 253 | * RETURNS | ||
| 254 | * Pointer to allocated memory, or NULL in case of failure. | ||
| 255 | * Allocated memory is zero initialised. | ||
| 256 | * | ||
| 257 | *----------------------------------------------------------------------------*/ | ||
| 258 | #ifdef CSR_MEM_DEBUG | ||
| 259 | void *CsrMemCallocDebug(size_t numberOfElements, size_t elementSize, | ||
| 260 | const char *file, u32 line); | ||
| 261 | #define CsrMemCalloc(cnt, sz) CsrMemAllocDebug((cnt), (sz), __FILE__, __LINE__) | ||
| 262 | #else | ||
| 263 | void *CsrMemCalloc(size_t numberOfElements, size_t elementSize); | ||
| 264 | #endif | ||
| 265 | |||
| 266 | /*----------------------------------------------------------------------------* | ||
| 267 | * NAME | ||
| 268 | * CsrMemAllocDma | 247 | * CsrMemAllocDma |
| 269 | * | 248 | * |
| 270 | * DESCRIPTION | 249 | * DESCRIPTION |
| @@ -288,8 +267,6 @@ void *CsrMemAllocDma(size_t size); | |||
| 288 | 267 | ||
| 289 | #include "csr_pmem.h" | 268 | #include "csr_pmem.h" |
| 290 | 269 | ||
| 291 | #define CsrMemCalloc(numberOfElements, elementSize) CsrPmemDebugAlloc((numberOfElements * elementSize), CSR_PMEM_DEBUG_TYPE_MEM_CALLOC, __FILE__, __LINE__) | ||
| 292 | |||
| 293 | #define CsrMemAllocDma(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__) | 270 | #define CsrMemAllocDma(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__) |
| 294 | 271 | ||
| 295 | #endif | 272 | #endif |
