@@ -35,9 +35,6 @@ static struct workqueue_struct *mboxd;
static struct omap_mbox **mboxes;
static bool rq_full;
-static int mbox_configured;
-static DEFINE_MUTEX(mbox_configured_lock);
-
static unsigned int mbox_kfifo_size = CONFIG_OMAP_MBOX_KFIFO_SIZE;
module_param(mbox_kfifo_size, uint, S_IRUGO);
MODULE_PARM_DESC(mbox_kfifo_size, "Size of omap's mailbox kfifo (bytes)");
@@ -240,16 +237,9 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
struct omap_mbox_queue *mq;
if (mbox->ops->startup) {
- mutex_lock(&mbox_configured_lock);
- if (!mbox_configured)
- ret = mbox->ops->startup(mbox);
-
- if (ret) {
- mutex_unlock(&mbox_configured_lock);
+ ret = mbox->ops->startup(mbox);
+ if (ret)
return ret;
- }
- mbox_configured++;
- mutex_unlock(&mbox_configured_lock);
}
ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED,
@@ -295,14 +285,8 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
mbox_queue_free(mbox->txq);
mbox_queue_free(mbox->rxq);
- if (mbox->ops->shutdown) {
- mutex_lock(&mbox_configured_lock);
- if (mbox_configured > 0)
- mbox_configured--;
- if (!mbox_configured)
- mbox->ops->shutdown(mbox);
- mutex_unlock(&mbox_configured_lock);
- }
+ if (mbox->ops->shutdown)
+ mbox->ops->shutdown(mbox);
}
struct omap_mbox *omap_mbox_get(const char *name, int (*callback)(void *))