staging: wilc1000: rename strCriticalSection in struct message_queue
authorChaehyun Lim <chaehyun.lim@gmail.com>
Thu, 21 Jan 2016 11:30:37 +0000 (20:30 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Feb 2016 23:21:18 +0000 (15:21 -0800)
This patch renames strCriticalSection to lock to avoid camelcase.

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

index b996c47af15d423fc2f3ed6b32dead48c9501341..67bf147d71220d458bd313636699eb33582f221c 100644 (file)
@@ -13,7 +13,7 @@
  */
 int wilc_mq_create(struct message_queue *pHandle)
 {
-       spin_lock_init(&pHandle->strCriticalSection);
+       spin_lock_init(&pHandle->lock);
        sema_init(&pHandle->sem, 0);
        pHandle->pstrMessageList = NULL;
        pHandle->u32ReceiversCount = 0;
@@ -83,7 +83,7 @@ int wilc_mq_send(struct message_queue *pHandle,
                return -ENOMEM;
        }
 
-       spin_lock_irqsave(&pHandle->strCriticalSection, flags);
+       spin_lock_irqsave(&pHandle->lock, flags);
 
        /* add it to the message queue */
        if (!pHandle->pstrMessageList) {
@@ -97,7 +97,7 @@ int wilc_mq_send(struct message_queue *pHandle,
                pstrTailMsg->next = pstrMessage;
        }
 
-       spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+       spin_unlock_irqrestore(&pHandle->lock, flags);
 
        up(&pHandle->sem);
 
@@ -128,22 +128,22 @@ int wilc_mq_recv(struct message_queue *pHandle,
                return -EFAULT;
        }
 
-       spin_lock_irqsave(&pHandle->strCriticalSection, flags);
+       spin_lock_irqsave(&pHandle->lock, flags);
        pHandle->u32ReceiversCount++;
-       spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+       spin_unlock_irqrestore(&pHandle->lock, flags);
 
        down(&pHandle->sem);
-       spin_lock_irqsave(&pHandle->strCriticalSection, flags);
+       spin_lock_irqsave(&pHandle->lock, flags);
 
        pstrMessage = pHandle->pstrMessageList;
        if (!pstrMessage) {
-               spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+               spin_unlock_irqrestore(&pHandle->lock, flags);
                PRINT_ER("pstrMessage is null\n");
                return -EFAULT;
        }
        /* check buffer size */
        if (u32RecvBufferSize < pstrMessage->len) {
-               spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+               spin_unlock_irqrestore(&pHandle->lock, flags);
                up(&pHandle->sem);
                PRINT_ER("u32RecvBufferSize overflow\n");
                return -EOVERFLOW;
@@ -159,7 +159,7 @@ int wilc_mq_recv(struct message_queue *pHandle,
        kfree(pstrMessage->buf);
        kfree(pstrMessage);
 
-       spin_unlock_irqrestore(&pHandle->strCriticalSection, flags);
+       spin_unlock_irqrestore(&pHandle->lock, flags);
 
        return 0;
 }
index 3ea40682cdf042992605aab7582b073f779d6ce1..6cdebbf09c111a6319c870a80ef74862540199a9 100644 (file)
@@ -21,7 +21,7 @@ struct message {
 
 struct message_queue {
        struct semaphore sem;
-       spinlock_t strCriticalSection;
+       spinlock_t lock;
        bool bExiting;
        u32 u32ReceiversCount;
        struct message *pstrMessageList;
This page took 0.03823 seconds and 5 git commands to generate.