Commit f9d26e21 authored by Chaehyun Lim's avatar Chaehyun Lim Committed by Greg Kroah-Hartman

staging: wilc1000: rename pstrMessageList in struct message_queue

This patch renames pstrMessageList to msg_list to avoid camelcase.
Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ec815ec5
...@@ -15,7 +15,7 @@ int wilc_mq_create(struct message_queue *pHandle) ...@@ -15,7 +15,7 @@ int wilc_mq_create(struct message_queue *pHandle)
{ {
spin_lock_init(&pHandle->lock); spin_lock_init(&pHandle->lock);
sema_init(&pHandle->sem, 0); sema_init(&pHandle->sem, 0);
pHandle->pstrMessageList = NULL; pHandle->msg_list = NULL;
pHandle->recv_count = 0; pHandle->recv_count = 0;
pHandle->exiting = false; pHandle->exiting = false;
return 0; return 0;
...@@ -37,11 +37,11 @@ int wilc_mq_destroy(struct message_queue *pHandle) ...@@ -37,11 +37,11 @@ int wilc_mq_destroy(struct message_queue *pHandle)
pHandle->recv_count--; pHandle->recv_count--;
} }
while (pHandle->pstrMessageList) { while (pHandle->msg_list) {
struct message *pstrMessge = pHandle->pstrMessageList->next; struct message *pstrMessge = pHandle->msg_list->next;
kfree(pHandle->pstrMessageList); kfree(pHandle->msg_list);
pHandle->pstrMessageList = pstrMessge; pHandle->msg_list = pstrMessge;
} }
return 0; return 0;
...@@ -86,10 +86,10 @@ int wilc_mq_send(struct message_queue *pHandle, ...@@ -86,10 +86,10 @@ int wilc_mq_send(struct message_queue *pHandle,
spin_lock_irqsave(&pHandle->lock, flags); spin_lock_irqsave(&pHandle->lock, flags);
/* add it to the message queue */ /* add it to the message queue */
if (!pHandle->pstrMessageList) { if (!pHandle->msg_list) {
pHandle->pstrMessageList = pstrMessage; pHandle->msg_list = pstrMessage;
} else { } else {
struct message *pstrTailMsg = pHandle->pstrMessageList; struct message *pstrTailMsg = pHandle->msg_list;
while (pstrTailMsg->next) while (pstrTailMsg->next)
pstrTailMsg = pstrTailMsg->next; pstrTailMsg = pstrTailMsg->next;
...@@ -135,7 +135,7 @@ int wilc_mq_recv(struct message_queue *pHandle, ...@@ -135,7 +135,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
down(&pHandle->sem); down(&pHandle->sem);
spin_lock_irqsave(&pHandle->lock, flags); spin_lock_irqsave(&pHandle->lock, flags);
pstrMessage = pHandle->pstrMessageList; pstrMessage = pHandle->msg_list;
if (!pstrMessage) { if (!pstrMessage) {
spin_unlock_irqrestore(&pHandle->lock, flags); spin_unlock_irqrestore(&pHandle->lock, flags);
PRINT_ER("pstrMessage is null\n"); PRINT_ER("pstrMessage is null\n");
...@@ -154,7 +154,7 @@ int wilc_mq_recv(struct message_queue *pHandle, ...@@ -154,7 +154,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len); memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
*pu32ReceivedLength = pstrMessage->len; *pu32ReceivedLength = pstrMessage->len;
pHandle->pstrMessageList = pstrMessage->next; pHandle->msg_list = pstrMessage->next;
kfree(pstrMessage->buf); kfree(pstrMessage->buf);
kfree(pstrMessage); kfree(pstrMessage);
......
...@@ -24,7 +24,7 @@ struct message_queue { ...@@ -24,7 +24,7 @@ struct message_queue {
spinlock_t lock; spinlock_t lock;
bool exiting; bool exiting;
u32 recv_count; u32 recv_count;
struct message *pstrMessageList; struct message *msg_list;
}; };
/*! /*!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment