staging: wilc1000: rename pHandle in wilc_mq_send
This patch renames pHandle to mq to avoid camelcase. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fca978b718
commit
5eb359756f
|
@ -53,19 +53,19 @@ int wilc_mq_destroy(struct message_queue *mq)
|
||||||
* @note copied from FLO glue implementatuion
|
* @note copied from FLO glue implementatuion
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
int wilc_mq_send(struct message_queue *pHandle,
|
int wilc_mq_send(struct message_queue *mq,
|
||||||
const void *pvSendBuffer, u32 u32SendBufferSize)
|
const void *pvSendBuffer, u32 u32SendBufferSize)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct message *pstrMessage = NULL;
|
struct message *pstrMessage = NULL;
|
||||||
|
|
||||||
if ((!pHandle) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
|
if ((!mq) || (u32SendBufferSize == 0) || (!pvSendBuffer)) {
|
||||||
PRINT_ER("pHandle or pvSendBuffer is null\n");
|
PRINT_ER("mq or pvSendBuffer is null\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pHandle->exiting) {
|
if (mq->exiting) {
|
||||||
PRINT_ER("pHandle fail\n");
|
PRINT_ER("mq fail\n");
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,13 +83,13 @@ int wilc_mq_send(struct message_queue *pHandle,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_lock_irqsave(&pHandle->lock, flags);
|
spin_lock_irqsave(&mq->lock, flags);
|
||||||
|
|
||||||
/* add it to the message queue */
|
/* add it to the message queue */
|
||||||
if (!pHandle->msg_list) {
|
if (!mq->msg_list) {
|
||||||
pHandle->msg_list = pstrMessage;
|
mq->msg_list = pstrMessage;
|
||||||
} else {
|
} else {
|
||||||
struct message *pstrTailMsg = pHandle->msg_list;
|
struct message *pstrTailMsg = mq->msg_list;
|
||||||
|
|
||||||
while (pstrTailMsg->next)
|
while (pstrTailMsg->next)
|
||||||
pstrTailMsg = pstrTailMsg->next;
|
pstrTailMsg = pstrTailMsg->next;
|
||||||
|
@ -97,9 +97,9 @@ int wilc_mq_send(struct message_queue *pHandle,
|
||||||
pstrTailMsg->next = pstrMessage;
|
pstrTailMsg->next = pstrMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
spin_unlock_irqrestore(&pHandle->lock, flags);
|
spin_unlock_irqrestore(&mq->lock, flags);
|
||||||
|
|
||||||
up(&pHandle->sem);
|
up(&mq->sem);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ int wilc_mq_create(struct message_queue *mq);
|
||||||
* @date 30 Aug 2010
|
* @date 30 Aug 2010
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
int wilc_mq_send(struct message_queue *pHandle,
|
int wilc_mq_send(struct message_queue *mq,
|
||||||
const void *pvSendBuffer, u32 u32SendBufferSize);
|
const void *pvSendBuffer, u32 u32SendBufferSize);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue