소스 검색

staging: wilc1000: use kmalloc instead of WILC_NEW

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>
Chaehyun Lim 10 년 전
부모
커밋
5c07828f5d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/staging/wilc1000/wilc_msgqueue.c

+ 1 - 1
drivers/staging/wilc1000/wilc_msgqueue.c

@@ -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;