summaryrefslogtreecommitdiffstats
path: root/drivers/staging/csr/csr_msgconv.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 16:41:09 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-20 16:41:09 -0700
commit786eeeb3756e7fb08174c3a136c16462ccd541d1 (patch)
tree9b7621b4448768f8f950e80a1bba468652608f1c /drivers/staging/csr/csr_msgconv.c
parent55a27055b9ea5aabf8206ed6b7777c79f4e840c3 (diff)
downloadop-kernel-dev-786eeeb3756e7fb08174c3a136c16462ccd541d1.zip
op-kernel-dev-786eeeb3756e7fb08174c3a136c16462ccd541d1.tar.gz
staging: csr: remove CsrPmemAlloc
It's just a wrapper around kmalloc(, GFP_KERNEL) + a call to panic() if we are out of memory, which is a very foolish thing to do (the panic that is.) So replace it with calls to kmalloc() and ignore the out-of-memory casese for now, odds are it will not be hit, and if it does, hey, we will end up panicing just the same as with the old code. 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_msgconv.c')
-rw-r--r--drivers/staging/csr/csr_msgconv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/csr/csr_msgconv.c b/drivers/staging/csr/csr_msgconv.c
index 42e0a4a..dbf0d64 100644
--- a/drivers/staging/csr/csr_msgconv.c
+++ b/drivers/staging/csr/csr_msgconv.c
@@ -233,7 +233,7 @@ void CsrMsgConvInsert(u16 primType, const CsrMsgConvMsgEntry *ce)
}
else
{
- pc = CsrPmemAlloc(sizeof(*pc));
+ pc = kmalloc(sizeof(*pc), GFP_KERNEL);
pc->primType = primType;
pc->conv = ce;
pc->lookupFunc = NULL;
@@ -279,7 +279,7 @@ CsrMsgConvEntry *CsrMsgConvInit(void)
{
if (!converter)
{
- converter = (CsrMsgConvEntry *) CsrPmemAlloc(sizeof(CsrMsgConvEntry));
+ converter = kmalloc(sizeof(CsrMsgConvEntry), GFP_KERNEL);
converter->profile_converters = NULL;
converter->free_message = free_message;
OpenPOWER on IntegriCloud