]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: r8188eu: Remove wrappers for spin_lock_irqsave
authorLarry Finger <Larry.Finger@lwfinger.net>
Fri, 20 Dec 2013 04:38:36 +0000 (22:38 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 16:57:45 +0000 (08:57 -0800)
There are two such wrappers - _enter_critical() and _enter_critical_ex().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_recv.c
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

index 5e9b8a59a56ae556d0f8fe9812a2bb299b4022fe..4561ffe87f73a77ab817f72046f349502bec34bd 100644 (file)
@@ -153,7 +153,7 @@ _func_enter_;
        if (obj == NULL)
                goto exit;
 
-       _enter_critical(&queue->lock, &irqL);
+       spin_lock_irqsave(&queue->lock, irqL);
 
        rtw_list_insert_tail(&obj->list, &queue->queue);
 
@@ -173,7 +173,7 @@ struct      cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
 
 _func_enter_;
 
-       _enter_critical(&queue->lock, &irqL);
+       spin_lock_irqsave(&queue->lock, irqL);
        if (rtw_is_list_empty(&(queue->queue))) {
                obj = NULL;
        } else {
index f77b3aa6c27e318a2ed4b1b62a135774ca86fb3f..bf8f6e5a777747351af3fe9798dca23ccbb12053 100644 (file)
@@ -326,7 +326,7 @@ int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue
 int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
 {
        unsigned long irqL;
-       _enter_critical_ex(&queue->lock, &irqL);
+       spin_lock_irqsave(&queue->lock, irqL);
 
        rtw_list_delete(&precvbuf->list);
 
@@ -341,7 +341,7 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
        struct recv_buf *precvbuf;
        struct list_head *plist, *phead;
 
-       _enter_critical_ex(&queue->lock, &irqL);
+       spin_lock_irqsave(&queue->lock, irqL);
 
        if (_rtw_queue_empty(queue)) {
                precvbuf = NULL;
index b57ed45341f938987ae8e1704b8b480f301490b9..e805a4bdff3287e2d104a899ee3f4fb748c0e05c 100644 (file)
@@ -1273,7 +1273,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
 
 _func_enter_;
 
-       _enter_critical(&pfree_queue->lock, &irql);
+       spin_lock_irqsave(&pfree_queue->lock, irql);
 
        if (_rtw_queue_empty(pfree_queue) == true) {
                pxmitbuf = NULL;
@@ -1316,7 +1316,7 @@ _func_enter_;
        if (pxmitbuf == NULL)
                return _FAIL;
 
-       _enter_critical(&pfree_queue->lock, &irql);
+       spin_lock_irqsave(&pfree_queue->lock, irql);
 
        rtw_list_delete(&pxmitbuf->list);
 
@@ -1341,7 +1341,7 @@ _func_enter_;
 
        /* DBG_88E("+rtw_alloc_xmitbuf\n"); */
 
-       _enter_critical(&pfree_xmitbuf_queue->lock, &irql);
+       spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irql);
 
        if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
                pxmitbuf = NULL;
@@ -1387,7 +1387,7 @@ _func_enter_;
        if (pxmitbuf->ext_tag) {
                rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf);
        } else {
-               _enter_critical(&pfree_xmitbuf_queue->lock, &irql);
+               spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irql);
 
                rtw_list_delete(&pxmitbuf->list);
 
index c39c226185de844d20b44ca2a7f8ad335722777d..8fd93871547af52fe9406e900d4df8f492ec2656 100644 (file)
@@ -76,22 +76,11 @@ static inline struct list_head *get_list_head(struct __queue *queue)
 #define LIST_CONTAINOR(ptr, type, member) \
        ((type *)((char *)(ptr)-(size_t)(&((type *)0)->member)))
 
-
-static inline void _enter_critical(spinlock_t *plock, unsigned long *pirqL)
-{
-       spin_lock_irqsave(plock, *pirqL);
-}
-
 static inline void _exit_critical(spinlock_t *plock, unsigned long *pirqL)
 {
        spin_unlock_irqrestore(plock, *pirqL);
 }
 
-static inline void _enter_critical_ex(spinlock_t *plock, unsigned long *pirqL)
-{
-       spin_lock_irqsave(plock, *pirqL);
-}
-
 static inline void _exit_critical_ex(spinlock_t *plock, unsigned long *pirqL)
 {
        spin_unlock_irqrestore(plock, *pirqL);
index 4c71e3b93b58d2e42195c06220f40ae91625a9b2..a621b80da938952ee6dda72481f22b339513f016 100644 (file)
@@ -186,7 +186,7 @@ _func_enter_;
                goto exit;
        }
 
-       _enter_critical(&pxmitpriv->lock, &irqL);
+       spin_lock_irqsave(&pxmitpriv->lock, irqL);
 
        switch (addr) {
        case VO_QUEUE_INX: