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

staging: wilc1000: rename u32ReceiversCount in struct message_queue

This patch renames u32ReceiversCount to recv_count to avoid camelcase.
Signed-off-by: default avatarChaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c700cab3
...@@ -16,7 +16,7 @@ int wilc_mq_create(struct message_queue *pHandle) ...@@ -16,7 +16,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->pstrMessageList = NULL;
pHandle->u32ReceiversCount = 0; pHandle->recv_count = 0;
pHandle->exiting = false; pHandle->exiting = false;
return 0; return 0;
} }
...@@ -32,9 +32,9 @@ int wilc_mq_destroy(struct message_queue *pHandle) ...@@ -32,9 +32,9 @@ int wilc_mq_destroy(struct message_queue *pHandle)
pHandle->exiting = true; pHandle->exiting = true;
/* Release any waiting receiver thread. */ /* Release any waiting receiver thread. */
while (pHandle->u32ReceiversCount > 0) { while (pHandle->recv_count > 0) {
up(&pHandle->sem); up(&pHandle->sem);
pHandle->u32ReceiversCount--; pHandle->recv_count--;
} }
while (pHandle->pstrMessageList) { while (pHandle->pstrMessageList) {
...@@ -129,7 +129,7 @@ int wilc_mq_recv(struct message_queue *pHandle, ...@@ -129,7 +129,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
} }
spin_lock_irqsave(&pHandle->lock, flags); spin_lock_irqsave(&pHandle->lock, flags);
pHandle->u32ReceiversCount++; pHandle->recv_count++;
spin_unlock_irqrestore(&pHandle->lock, flags); spin_unlock_irqrestore(&pHandle->lock, flags);
down(&pHandle->sem); down(&pHandle->sem);
...@@ -150,7 +150,7 @@ int wilc_mq_recv(struct message_queue *pHandle, ...@@ -150,7 +150,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
} }
/* consume the message */ /* consume the message */
pHandle->u32ReceiversCount--; pHandle->recv_count--;
memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len); memcpy(pvRecvBuffer, pstrMessage->buf, pstrMessage->len);
*pu32ReceivedLength = pstrMessage->len; *pu32ReceivedLength = pstrMessage->len;
......
...@@ -23,7 +23,7 @@ struct message_queue { ...@@ -23,7 +23,7 @@ struct message_queue {
struct semaphore sem; struct semaphore sem;
spinlock_t lock; spinlock_t lock;
bool exiting; bool exiting;
u32 u32ReceiversCount; u32 recv_count;
struct message *pstrMessageList; struct message *pstrMessageList;
}; };
......
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