summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/mailbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
-rw-r--r--arch/arm/plat-omap/mailbox.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
index c3402165488..fafe47bf2f5 100644
--- a/arch/arm/plat-omap/mailbox.c
+++ b/arch/arm/plat-omap/mailbox.c
@@ -31,7 +31,7 @@
static struct workqueue_struct *mboxd;
static struct omap_mbox *mboxes;
-static DEFINE_RWLOCK(mboxes_lock);
+static DEFINE_SPINLOCK(mboxes_lock);
static bool rq_full;
static int mbox_configured;
@@ -341,14 +341,14 @@ struct omap_mbox *omap_mbox_get(const char *name)
struct omap_mbox *mbox;
int ret;
- read_lock(&mboxes_lock);
+ spin_lock(&mboxes_lock);
mbox = *(find_mboxes(name));
if (mbox == NULL) {
- read_unlock(&mboxes_lock);
+ spin_unlock(&mboxes_lock);
return ERR_PTR(-ENOENT);
}
- read_unlock(&mboxes_lock);
+ spin_unlock(&mboxes_lock);
ret = omap_mbox_startup(mbox);
if (ret)
@@ -374,15 +374,15 @@ int omap_mbox_register(struct device *parent, struct omap_mbox *mbox)
if (mbox->next)
return -EBUSY;
- write_lock(&mboxes_lock);
+ spin_lock(&mboxes_lock);
tmp = find_mboxes(mbox->name);
if (*tmp) {
ret = -EBUSY;
- write_unlock(&mboxes_lock);
+ spin_unlock(&mboxes_lock);
goto err_find;
}
*tmp = mbox;
- write_unlock(&mboxes_lock);
+ spin_unlock(&mboxes_lock);
return 0;
@@ -395,18 +395,18 @@ int omap_mbox_unregister(struct omap_mbox *mbox)
{
struct omap_mbox **tmp;
- write_lock(&mboxes_lock);
+ spin_lock(&mboxes_lock);
tmp = &mboxes;
while (*tmp) {
if (mbox == *tmp) {
*tmp = mbox->next;
mbox->next = NULL;
- write_unlock(&mboxes_lock);
+ spin_unlock(&mboxes_lock);
return 0;
}
tmp = &(*tmp)->next;
}
- write_unlock(&mboxes_lock);
+ spin_unlock(&mboxes_lock);
return -EINVAL;
}