From patchwork Wed Apr 3 06:33:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2385121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 093BADFB79 for ; Wed, 3 Apr 2013 06:32:58 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNHCw-000579-R5; Wed, 03 Apr 2013 06:30:07 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNHA9-00039x-Ai for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2013 06:27:14 +0000 Received: by mail-pb0-f46.google.com with SMTP id rp8so669094pbb.33 for ; Tue, 02 Apr 2013 23:27:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:date:message-id:in-reply-to:references :subject; bh=K0H1x9E4kaUGn4bB+8885RDFG1BKvUsOYc977xxb/i4=; b=Ho4AMufPg+ZcALT/bIrpY0Yu/bC2Tke3ZVI/aRqKVQc0oewFpphdRntbBAXi/GPnTf t89IuOPGtLNu17cHYZwWVJbjWNoqYH5gkq0T+RJ0A2fToB41xZH77dgI5jTOJQbDsffv /C1E6YS00BxQ2F7Kkru8e+cduR5Z+12pHt13L6ruG7M1Y0Vgsb4iiecWXCNUJ1qQzJHv YMdOfljAW+vrTyOmY3YOwjw7PQizFTjjz8ZLxzWiHCmrYFJFfJfWo8T495spkoYVW9e2 01CC1dO6BiRIWRdoGe+5ByAeA8hpqrbX9bvBR+eSjkl4Ag+1Yhye7bXKLozNUmzTTAk/ OTVw== X-Received: by 10.66.182.227 with SMTP id eh3mr1477119pac.6.1364970429994; Tue, 02 Apr 2013 23:27:09 -0700 (PDT) Received: from [127.0.0.1] (FLH1All083.tky.mesh.ad.jp. [211.13.49.83]) by mx.google.com with ESMTPS id pa2sm4653810pac.9.2013.04.02.23.27.07 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:27:08 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 03 Apr 2013 15:33:08 +0900 Message-Id: <20130403063308.2500.76867.sendpatchset@w520> In-Reply-To: <20130403063246.2500.65318.sendpatchset@w520> References: <20130403063246.2500.65318.sendpatchset@w520> Subject: [PATCH 02/04] ARM: shmobile: r8a7779 pinmux platform device cleanup X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130403_022713_705528_CA9F8B30 X-CRM114-Status: GOOD ( 10.31 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.46 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (magnus.damm[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: laurent.pinchart+renesas@ideasonboard.com, kuninori.morimoto.gx@renesas.com, arnd@arndb.de, Magnus Damm , horms@verge.net.au, olof@lixom.net, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Magnus Damm Use DEFINE_RES_MEM() to save a couple of lines of code. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/setup-r8a7779.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) --- 0001/arch/arm/mach-shmobile/setup-r8a7779.c +++ work/arch/arm/mach-shmobile/setup-r8a7779.c 2013-04-03 15:30:16.000000000 +0900 @@ -63,12 +63,8 @@ void __init r8a7779_map_io(void) iotable_init(r8a7779_io_desc, ARRAY_SIZE(r8a7779_io_desc)); } -static struct resource r8a7779_pfc_resources[] = { - [0] = { - .start = 0xfffc0000, - .end = 0xfffc023b, - .flags = IORESOURCE_MEM, - }, +static const struct resource r8a7779_pfc_resources[] = { + DEFINE_RES_MEM(0xfffc0000, 0x023c), }; static struct platform_device r8a7779_pfc_device = { @@ -80,15 +76,8 @@ static struct platform_device r8a7779_pf #define R8A7779_GPIO(idx, npins) \ static struct resource r8a7779_gpio##idx##_resources[] = { \ - [0] = { \ - .start = 0xffc40000 + 0x1000 * (idx), \ - .end = 0xffc4002b + 0x1000 * (idx), \ - .flags = IORESOURCE_MEM, \ - }, \ - [1] = { \ - .start = gic_iid(0xad + (idx)), \ - .flags = IORESOURCE_IRQ, \ - } \ + DEFINE_RES_MEM(0xffc40000 + (0x1000 * (idx)), 0x002c), \ + DEFINE_RES_IRQ(gic_iid(0xad + (idx))), \ }; \ \ static struct gpio_rcar_config r8a7779_gpio##idx##_platform_data = { \