Commit f937886b authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8188eu: Remove wrappers for spin_lock_irqsave

There are two such wrappers - _enter_critical() and _enter_critical_ex().
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e02bcf61
...@@ -153,7 +153,7 @@ _func_enter_; ...@@ -153,7 +153,7 @@ _func_enter_;
if (obj == NULL) if (obj == NULL)
goto exit; goto exit;
_enter_critical(&queue->lock, &irqL); spin_lock_irqsave(&queue->lock, irqL);
rtw_list_insert_tail(&obj->list, &queue->queue); rtw_list_insert_tail(&obj->list, &queue->queue);
...@@ -173,7 +173,7 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) ...@@ -173,7 +173,7 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
_func_enter_; _func_enter_;
_enter_critical(&queue->lock, &irqL); spin_lock_irqsave(&queue->lock, irqL);
if (rtw_is_list_empty(&(queue->queue))) { if (rtw_is_list_empty(&(queue->queue))) {
obj = NULL; obj = NULL;
} else { } else {
......
...@@ -326,7 +326,7 @@ int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue ...@@ -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) int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
{ {
unsigned long irqL; unsigned long irqL;
_enter_critical_ex(&queue->lock, &irqL); spin_lock_irqsave(&queue->lock, irqL);
rtw_list_delete(&precvbuf->list); rtw_list_delete(&precvbuf->list);
...@@ -341,7 +341,7 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue) ...@@ -341,7 +341,7 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
struct recv_buf *precvbuf; struct recv_buf *precvbuf;
struct list_head *plist, *phead; struct list_head *plist, *phead;
_enter_critical_ex(&queue->lock, &irqL); spin_lock_irqsave(&queue->lock, irqL);
if (_rtw_queue_empty(queue)) { if (_rtw_queue_empty(queue)) {
precvbuf = NULL; precvbuf = NULL;
......
...@@ -1273,7 +1273,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv) ...@@ -1273,7 +1273,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
_func_enter_; _func_enter_;
_enter_critical(&pfree_queue->lock, &irql); spin_lock_irqsave(&pfree_queue->lock, irql);
if (_rtw_queue_empty(pfree_queue) == true) { if (_rtw_queue_empty(pfree_queue) == true) {
pxmitbuf = NULL; pxmitbuf = NULL;
...@@ -1316,7 +1316,7 @@ _func_enter_; ...@@ -1316,7 +1316,7 @@ _func_enter_;
if (pxmitbuf == NULL) if (pxmitbuf == NULL)
return _FAIL; return _FAIL;
_enter_critical(&pfree_queue->lock, &irql); spin_lock_irqsave(&pfree_queue->lock, irql);
rtw_list_delete(&pxmitbuf->list); rtw_list_delete(&pxmitbuf->list);
...@@ -1341,7 +1341,7 @@ _func_enter_; ...@@ -1341,7 +1341,7 @@ _func_enter_;
/* DBG_88E("+rtw_alloc_xmitbuf\n"); */ /* 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) { if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
pxmitbuf = NULL; pxmitbuf = NULL;
...@@ -1387,7 +1387,7 @@ _func_enter_; ...@@ -1387,7 +1387,7 @@ _func_enter_;
if (pxmitbuf->ext_tag) { if (pxmitbuf->ext_tag) {
rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf); rtw_free_xmitbuf_ext(pxmitpriv, pxmitbuf);
} else { } else {
_enter_critical(&pfree_xmitbuf_queue->lock, &irql); spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irql);
rtw_list_delete(&pxmitbuf->list); rtw_list_delete(&pxmitbuf->list);
......
...@@ -76,22 +76,11 @@ static inline struct list_head *get_list_head(struct __queue *queue) ...@@ -76,22 +76,11 @@ static inline struct list_head *get_list_head(struct __queue *queue)
#define LIST_CONTAINOR(ptr, type, member) \ #define LIST_CONTAINOR(ptr, type, member) \
((type *)((char *)(ptr)-(size_t)(&((type *)0)->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) static inline void _exit_critical(spinlock_t *plock, unsigned long *pirqL)
{ {
spin_unlock_irqrestore(plock, *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) static inline void _exit_critical_ex(spinlock_t *plock, unsigned long *pirqL)
{ {
spin_unlock_irqrestore(plock, *pirqL); spin_unlock_irqrestore(plock, *pirqL);
......
...@@ -186,7 +186,7 @@ _func_enter_; ...@@ -186,7 +186,7 @@ _func_enter_;
goto exit; goto exit;
} }
_enter_critical(&pxmitpriv->lock, &irqL); spin_lock_irqsave(&pxmitpriv->lock, irqL);
switch (addr) { switch (addr) {
case VO_QUEUE_INX: case VO_QUEUE_INX:
......
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