From patchwork Tue Nov 9 04:44:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepak Chitriki X-Patchwork-Id: 310172 X-Patchwork-Delegate: hiroshi.doyu@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA94j1Jk020118 for ; Tue, 9 Nov 2010 04:45:01 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337Ab0KIEpA (ORCPT ); Mon, 8 Nov 2010 23:45:00 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:37986 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751418Ab0KIEo7 (ORCPT ); Mon, 8 Nov 2010 23:44:59 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id oA94itHR004387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Nov 2010 22:44:55 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id oA94itN4011973; Mon, 8 Nov 2010 22:44:55 -0600 (CST) Received: from localhost (h56-196.vpn.ti.com [172.24.56.196]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oA94isf10329; Mon, 8 Nov 2010 22:44:54 -0600 (CST) From: Deepak Chitriki To: Hiroshi.DOYU@nokia.com Cc: linux-omap@vger.kernel.org, fernando.lugo@ti.com, Deepak Chitriki Subject: [PATCH] omap: mailbox - Enable IRQ after allocating queues Date: Mon, 8 Nov 2010 22:44:52 -0600 Message-Id: <1289277892-16854-1-git-send-email-deepak.chitriki@ti.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 09 Nov 2010 04:45:01 +0000 (UTC) diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index c59c9c3..1513e16 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -256,14 +256,6 @@ static int omap_mbox_startup(struct omap_mbox *mbox) mutex_unlock(&mbox_configured_lock); } - ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED, - mbox->name, mbox); - if (ret) { - printk(KERN_ERR - "failed to register mailbox interrupt:%d\n", ret); - goto fail_request_irq; - } - mq = mbox_queue_alloc(mbox, NULL, mbox_tx_tasklet); if (!mq) { ret = -ENOMEM; @@ -278,13 +270,21 @@ static int omap_mbox_startup(struct omap_mbox *mbox) } mbox->rxq = mq; + ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED, + mbox->name, mbox); + if (ret) { + printk(KERN_ERR + "failed to register mailbox interrupt:%d\n", ret); + goto fail_request_irq; + } + return 0; - fail_alloc_rxq: +fail_request_irq: + mbox_queue_free(mbox->rxq); +fail_alloc_rxq: mbox_queue_free(mbox->txq); - fail_alloc_txq: - free_irq(mbox->irq, mbox); - fail_request_irq: +fail_alloc_txq: if (mbox->ops->shutdown) mbox->ops->shutdown(mbox);