staging: wilc1000: use kmalloc instead of WILC_NEW
authorChaehyun Lim <chaehyun.lim@gmail.com>
Mon, 17 Aug 2015 02:05:10 +0000 (11:05 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Aug 2015 19:47:46 +0000 (12:47 -0700)
WILC_NEW is replaced by kmallo with GFP_ATOMIC.
This kmalloc is inside a spin_lock_irqsave region.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_msgqueue.c

index d9035482ecd2f3e2427df48ef5914341de368f05..70e4fa6a07a65969af35529745d5c38d56399c81 100644 (file)
@@ -68,7 +68,7 @@ WILC_ErrNo WILC_MsgQueueSend(WILC_MsgQueueHandle *pHandle,
        spin_lock_irqsave(&pHandle->strCriticalSection, flags);
 
        /* construct a new message */
-       pstrMessage = WILC_NEW(Message, 1);
+       pstrMessage = kmalloc(sizeof(Message), GFP_ATOMIC);
        WILC_NULLCHECK(s32RetStatus, pstrMessage);
        pstrMessage->u32Length = u32SendBufferSize;
        pstrMessage->pstrNext = NULL;