diff options
author | Tony Lindgren <tony@atomide.com> | 2012-05-17 16:44:43 -0700 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-05-17 16:44:43 -0700 |
commit | 222e5cec47a54ff3dde72e7dfba10c67da3adca0 (patch) | |
tree | ab6bfda54629ca8bcc806f8749cefec0751da888 /arch/arm/plat-omap/mailbox.c | |
parent | d48b97b403d23f6df0b990cee652bdf9a52337a3 (diff) | |
parent | 7548c09a475039b5e9179615ac4c1c58b930cdb5 (diff) |
Merge branch 'for-tony' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/linux into fixes-omap4-dsp
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index ad32621aa52..5e13c3884aa 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -282,6 +282,8 @@ static int omap_mbox_startup(struct omap_mbox *mbox) } mbox->rxq = mq; mq->mbox = mbox; + + omap_mbox_enable_irq(mbox, IRQ_RX); } mutex_unlock(&mbox_configured_lock); return 0; @@ -305,6 +307,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox) mutex_lock(&mbox_configured_lock); if (!--mbox->use_count) { + omap_mbox_disable_irq(mbox, IRQ_RX); free_irq(mbox->irq, mbox); tasklet_kill(&mbox->txq->tasklet); flush_work_sync(&mbox->rxq->work); @@ -338,13 +341,15 @@ struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb) if (!mbox) return ERR_PTR(-ENOENT); - ret = omap_mbox_startup(mbox); - if (ret) - return ERR_PTR(-ENODEV); - if (nb) blocking_notifier_chain_register(&mbox->notifier, nb); + ret = omap_mbox_startup(mbox); + if (ret) { + blocking_notifier_chain_unregister(&mbox->notifier, nb); + return ERR_PTR(-ENODEV); + } + return mbox; } EXPORT_SYMBOL(omap_mbox_get); |