Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7de2c5b6 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: csr: remove CsrMemCalloc()



No one calls it, so it doesn't need to be here.

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 70128792
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
@@ -147,35 +147,6 @@ void CsrThreadSleep(u16 sleepTimeInMs)
}
EXPORT_SYMBOL_GPL(CsrThreadSleep);

/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrMemCalloc
 *
 *  DESCRIPTION
 *      Allocate dynamic memory of a given size calculated as the
 *      numberOfElements times the elementSize.
 *
 *  RETURNS
 *      Pointer to allocated memory, or NULL in case of failure.
 *      Allocated memory is zero initialised.
 *
 *----------------------------------------------------------------------------*/
void *CsrMemCalloc(size_t numberOfElements, size_t elementSize)
{
    void *buf;
    size_t size;

    size = numberOfElements * elementSize;

    buf = kmalloc(size, GFP_KERNEL);
    if (buf != NULL)
    {
        memset(buf, 0, size);
    }

    return buf;
}

/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrMemAllocDma
+0 −23
Original line number Diff line number Diff line
@@ -242,27 +242,6 @@ CsrResult CsrThreadEqual(CsrThreadHandle *threadHandle1, CsrThreadHandle *thread
void CsrThreadSleep(u16 sleepTimeInMs);

#ifndef CSR_PMEM_DEBUG_ENABLE
/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrMemCalloc
 *
 *  DESCRIPTION
 *      Allocate dynamic memory of a given size calculated as the
 *      numberOfElements times the elementSize.
 *
 *  RETURNS
 *      Pointer to allocated memory, or NULL in case of failure.
 *      Allocated memory is zero initialised.
 *
 *----------------------------------------------------------------------------*/
#ifdef CSR_MEM_DEBUG
void *CsrMemCallocDebug(size_t numberOfElements, size_t elementSize,
    const char *file, u32 line);
#define CsrMemCalloc(cnt, sz) CsrMemAllocDebug((cnt), (sz), __FILE__, __LINE__)
#else
void *CsrMemCalloc(size_t numberOfElements, size_t elementSize);
#endif

/*----------------------------------------------------------------------------*
 *  NAME
 *      CsrMemAllocDma
@@ -288,8 +267,6 @@ void *CsrMemAllocDma(size_t size);

#include "csr_pmem.h"

#define CsrMemCalloc(numberOfElements, elementSize) CsrPmemDebugAlloc((numberOfElements * elementSize), CSR_PMEM_DEBUG_TYPE_MEM_CALLOC, __FILE__, __LINE__)

#define CsrMemAllocDma(size) CsrPmemDebugAlloc(size, CSR_PMEM_DEBUG_TYPE_MEM_ALLOC_DMA, __FILE__, __LINE__)

#endif