From patchwork Fri May 21 21:44:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 101550 X-Patchwork-Delegate: hiroshi.doyu@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4LLixet008445 for ; Fri, 21 May 2010 21:45:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753336Ab0EUVo7 (ORCPT ); Fri, 21 May 2010 17:44:59 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:48769 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753040Ab0EUVo7 (ORCPT ); Fri, 21 May 2010 17:44:59 -0400 Received: by mail-bw0-f46.google.com with SMTP id 7so202277bwz.19 for ; Fri, 21 May 2010 14:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=k5dzxcyTDAa6srZNFed+JZwfWLSJjmU2WaE4JjizVbM=; b=KXPqkfGSrUhNm/D6xSindYwLYGMMmHdFNCqMOjtWa1Cd9Wz7Xy3CvF/fnUS5T9k1s1 hI4qwKbJP8bQ67N9fgSb1xorhcp7h+Yw0PIFLkAZF3gpvDGZ33BngS3Y39/GTEKt+mts g/Ma5KY5HQzpMyUZ+/3Wh0jTJoy9pHEC/BTZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=J+8Li1ZcInvFyww4fjSd1gzb2/2sCunF92BNfHz4R3yBhp758waQ4oSAt6bLDHRaSj wljcL7sbMx4zfiFQWE65zqfUKAygaZTt6O10Z8IXSDv5JrLcCfxvBFG8+gNK8eFdMbIJ +FSb+6DBkuk9J65GH26BaEGi9D+h4JCTAhzMs= Received: by 10.204.15.1 with SMTP id i1mr373973bka.207.1274478298262; Fri, 21 May 2010 14:44:58 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id a11sm6248144bkc.15.2010.05.21.14.44.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 21 May 2010 14:44:57 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: linux-arm , Hiroshi Doyu , Tony Lindgren , Felipe Contreras Subject: [PATCH v2t2 02/17] omap: mailbox: trivial cleanups Date: Sat, 22 May 2010 00:44:34 +0300 Message-Id: <1274478289-22188-3-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274478289-22188-1-git-send-email-felipe.contreras@gmail.com> References: <1274478289-22188-1-git-send-email-felipe.contreras@gmail.com> 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 (demeter.kernel.org [140.211.167.41]); Fri, 21 May 2010 21:45:00 +0000 (UTC) diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 379100c..462b59c 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c @@ -73,12 +73,10 @@ static inline void omap_init_rtc(void) {} # define INT_DSP_MAILBOX1 INT_1610_DSP_MAILBOX1 #endif -#define OMAP1_MBOX_BASE OMAP16XX_MAILBOX_BASE - static struct resource mbox_resources[] = { { - .start = OMAP1_MBOX_BASE, - .end = OMAP1_MBOX_BASE + OMAP1_MBOX_SIZE, + .start = OMAP16XX_MAILBOX_BASE, + .end = OMAP16XX_MAILBOX_BASE + OMAP1_MBOX_SIZE, .flags = IORESOURCE_MEM, }, { diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c index 4f5b3da..15bf2a2 100644 --- a/arch/arm/mach-omap1/mailbox.c +++ b/arch/arm/mach-omap1/mailbox.c @@ -83,7 +83,7 @@ static int omap1_mbox_fifo_full(struct omap_mbox *mbox) struct omap_mbox1_fifo *fifo = &((struct omap_mbox1_priv *)mbox->priv)->rx_fifo; - return (mbox_read_reg(fifo->flag)); + return mbox_read_reg(fifo->flag); } /* irq */ diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 763272c..c9f3d39 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -300,8 +300,6 @@ static struct omap_mbox2_priv omap2_mbox_dsp_priv = { .irqdisable = MAILBOX_IRQENABLE(0), }; - - /* OMAP4 specific data structure. Use the cpu_is_omap4xxx() to use this*/ static struct omap_mbox2_priv omap2_mbox_1_priv = { @@ -357,7 +355,6 @@ struct omap_mbox mbox_2_info = { }; EXPORT_SYMBOL(mbox_2_info); - #if defined(CONFIG_ARCH_OMAP2420) /* IVA */ static struct omap_mbox2_priv omap2_mbox_iva_priv = { .tx_fifo = { @@ -443,6 +440,11 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) #endif return 0; +#if defined(CONFIG_ARCH_OMAP2420) /* IVA */ +err_iva1: + omap_mbox_unregister(&mbox_dsp_info); +#endif + err_dsp: iounmap(mbox_base); return ret;