diff options
Diffstat (limited to 'include/asm-mips/smtc_ipi.h')
-rw-r--r-- | include/asm-mips/smtc_ipi.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/include/asm-mips/smtc_ipi.h b/include/asm-mips/smtc_ipi.h index 360ea6d250c7..a52a4a7a36e0 100644 --- a/include/asm-mips/smtc_ipi.h +++ b/include/asm-mips/smtc_ipi.h | |||
@@ -65,12 +65,10 @@ static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p) | |||
65 | spin_unlock_irqrestore(&q->lock, flags); | 65 | spin_unlock_irqrestore(&q->lock, flags); |
66 | } | 66 | } |
67 | 67 | ||
68 | static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q) | 68 | static inline struct smtc_ipi *__smtc_ipi_dq(struct smtc_ipi_q *q) |
69 | { | 69 | { |
70 | struct smtc_ipi *p; | 70 | struct smtc_ipi *p; |
71 | long flags; | ||
72 | 71 | ||
73 | spin_lock_irqsave(&q->lock, flags); | ||
74 | if (q->head == NULL) | 72 | if (q->head == NULL) |
75 | p = NULL; | 73 | p = NULL; |
76 | else { | 74 | else { |
@@ -81,7 +79,19 @@ static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q) | |||
81 | if (q->head == NULL) | 79 | if (q->head == NULL) |
82 | q->tail = NULL; | 80 | q->tail = NULL; |
83 | } | 81 | } |
82 | |||
83 | return p; | ||
84 | } | ||
85 | |||
86 | static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q) | ||
87 | { | ||
88 | unsigned long flags; | ||
89 | struct smtc_ipi *p; | ||
90 | |||
91 | spin_lock_irqsave(&q->lock, flags); | ||
92 | p = __smtc_ipi_dq(q); | ||
84 | spin_unlock_irqrestore(&q->lock, flags); | 93 | spin_unlock_irqrestore(&q->lock, flags); |
94 | |||
85 | return p; | 95 | return p; |
86 | } | 96 | } |
87 | 97 | ||