diff mbox

[1/4] omap: mailbox cleanup: convert rwlocks to spinlock

Message ID 8F7AF80515AF0D4D93307E594F3CB40E4B661D06@dlee03.ent.ti.com (mailing list archive)
State Changes Requested, archived
Delegated to: Hiroshi DOYU
Headers show

Commit Message

Kanigeri, Hari April 29, 2010, 12:44 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index 27a8d98..d6a700d 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -243,16 +243,16 @@  static int omap_mbox_startup(struct omap_mbox *mbox)
        struct omap_mbox_queue *mq;

        if (likely(mbox->ops->startup)) {
-               write_lock(&mboxes_lock);
+               spin_lock(&mboxes_lock);
                if (!mbox_configured)
                        ret = mbox->ops->startup(mbox);

                if (unlikely(ret)) {
-                       write_unlock(&mboxes_lock);
+                       spin_unlock(&mboxes_lock);
                        return ret;
                }
                mbox_configured++;
-               write_unlock(&mboxes_lock);
+               spin_unlock(&mboxes_lock);
        }

        ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
@@ -298,12 +298,12 @@  static void omap_mbox_fini(struct omap_mbox *mbox)
        free_irq(mbox->irq, mbox);

        if (likely(mbox->ops->shutdown)) {
-               write_lock(&mboxes_lock);
+               spin_lock(&mboxes_lock);
                if (mbox_configured > 0)
                        mbox_configured--;
                if (!mbox_configured)
                        mbox->ops->shutdown(mbox);
-               write_unlock(&mboxes_lock);
+               spin_unlock(&mboxes_lock);
        }
 }