]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/smtc_ipi.h
Merge davem@master.kernel.org:/pub/scm/linux/kernel/git/vxy/lksctp-dev
[linux-2.6-omap-h63xx.git] / include / asm-mips / smtc_ipi.h
index 360ea6d250c7a7aab3ec8516cffb99413bfe0e66..a52a4a7a36e0daf0ff258ec8197cb29c177dad90 100644 (file)
@@ -65,12 +65,10 @@ static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p)
        spin_unlock_irqrestore(&q->lock, flags);
 }
 
-static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q)
+static inline struct smtc_ipi *__smtc_ipi_dq(struct smtc_ipi_q *q)
 {
        struct smtc_ipi *p;
-       long flags;
 
-       spin_lock_irqsave(&q->lock, flags);
        if (q->head == NULL)
                p = NULL;
        else {
@@ -81,7 +79,19 @@ static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q)
                if (q->head == NULL)
                        q->tail = NULL;
        }
+
+       return p;
+}
+
+static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q *q)
+{
+       unsigned long flags;
+       struct smtc_ipi *p;
+
+       spin_lock_irqsave(&q->lock, flags);
+       p = __smtc_ipi_dq(q);
        spin_unlock_irqrestore(&q->lock, flags);
+
        return p;
 }