From patchwork Fri Jun 11 15:51:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 105606 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 o5BFqLHi023653 for ; Fri, 11 Jun 2010 15:52:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757055Ab0FKPwU (ORCPT ); Fri, 11 Jun 2010 11:52:20 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:50168 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756714Ab0FKPwT (ORCPT ); Fri, 11 Jun 2010 11:52:19 -0400 Received: by fxm8 with SMTP id 8so793789fxm.19 for ; Fri, 11 Jun 2010 08:52:18 -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; bh=tMWOC1UgN/RqrWhFR0JXblEd7zmD3BYLBAnat02siYk=; b=WO0Se+LkY5K2NWyT3UTnceSHEYaoTiD8crC5+rDTScUEOupsk+UXIjy46EDOIUtkC6 4aPKgTVuaxzEFTQ+Y3PBSJVIwNzjxWrNJ8glfGOPmItoC8q3i1gRKBTXUdabwe3nsz3e giQTD6T8KtTomezo7kIqGl/gYuqbawBMzinRY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=u/68TV9ttDdCpDSTEqywsFAPaJQW4DFtCV2EwvNwlvZc5QMTiXN7xnB84ImF+or3Rp V/nzMZgp0glC+6C3FAW7EBF0alC+VDvWzVSbpJKyoJO7uWGHQ1YBC07rNv8o4/PjYIxI doKNc4P5500TLGmcpidDPcim7Oi7PQeD9rr2A= Received: by 10.216.90.8 with SMTP id d8mr1170762wef.52.1276271537825; Fri, 11 Jun 2010 08:52:17 -0700 (PDT) Received: from localhost ([192.100.124.156]) by mx.google.com with ESMTPS id n66sm610288wej.13.2010.06.11.08.52.16 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 11 Jun 2010 08:52:16 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: linux-arm , Hiroshi Doyu , Tony Lindgren , Russell King Subject: [PATCH v4 00/14] omap: mailbox: bunch of cleanups Date: Fri, 11 Jun 2010 18:51:35 +0300 Message-Id: <1276271509-11983-1-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 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, 11 Jun 2010 15:52:21 +0000 (UTC) diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c index fdd6cc9..1a85a42 100644 --- a/arch/arm/mach-omap1/mailbox.c +++ b/arch/arm/mach-omap1/mailbox.c @@ -143,17 +143,16 @@ struct omap_mbox *omap1_mboxes[] = { &mbox_dsp_info, NULL }; static int __devinit omap1_mbox_probe(struct platform_device *pdev) { - struct resource *res; + struct resource *mem; int ret; int i; struct omap_mbox **list; - res = pdev->resource; - list = omap1_mboxes; list[0]->irq = platform_get_irq_byname(pdev, "dsp"); - mbox_base = ioremap(res[0].start, resource_size(&res[0])); + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + mbox_base = ioremap(mem->start, resource_size(mem)); if (!mbox_base) return -ENOMEM; diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index d46e439..42dbfa4 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c @@ -388,13 +388,12 @@ struct omap_mbox *omap4_mboxes[] = { &mbox_1_info, &mbox_2_info, NULL }; static int __devinit omap2_mbox_probe(struct platform_device *pdev) { - struct resource *res; + struct resource *mem; int ret; struct omap_mbox **list; - res = pdev->resource; - - if (false); + if (false) + ; #if defined(CONFIG_ARCH_OMAP3430) else if (cpu_is_omap3430()) { list = omap3_mboxes; @@ -423,7 +422,8 @@ static int __devinit omap2_mbox_probe(struct platform_device *pdev) return -ENODEV; } - mbox_base = ioremap(res[0].start, resource_size(&res[0])); + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + mbox_base = ioremap(mem->start, resource_size(mem)); if (!mbox_base) return -ENOMEM;