From patchwork Wed Apr 3 06:32:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2385101 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 89FAADFB79 for ; Wed, 3 Apr 2013 06:32:07 +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 1UNHCN-0004fz-Lk; Wed, 03 Apr 2013 06:29:31 +0000 Received: from mail-pb0-f47.google.com ([209.85.160.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNH9y-00033T-1U for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2013 06:27:02 +0000 Received: by mail-pb0-f47.google.com with SMTP id rq13so674667pbb.20 for ; Tue, 02 Apr 2013 23:27:00 -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=ngk7wFAWdER/Nfcrfc6xyu+3R0eEUwIZJ2qoccKk+A8=; b=i8eGixi0d3vJuLFnfZ3+9AbNypEBHp6eZNhWewIzn0LC0u6784uDcjuGriMvnAxLR6 dfKKg9dmsikXv/eSjiLXzZ90aEhuHiGWQaMm0yagvGDPrMedOxLj8AbAdwIrGPMLRsYg rLl9HHd5H3Ursq8+t1ZK+o1F0OOlSKdo2SyrO9tw16VCUjvaz1BwMufYNjLWR1c62Ki4 gw7BnWo6sLueDPIfwT6/hCAeIxfmN6phDFqrX6GkY4sVB51iE6oKzwYtCLzPhOfLRbDo S3o5OvVE5aG7j4k5C3of59lZGfDqK10aGe0kNjk0Vtk18zE5I+ju80OUt067ToLd8Nq4 udog== X-Received: by 10.68.204.10 with SMTP id ku10mr709211pbc.41.1364970420303; Tue, 02 Apr 2013 23:27:00 -0700 (PDT) Received: from [127.0.0.1] (FLH1All083.tky.mesh.ad.jp. [211.13.49.83]) by mx.google.com with ESMTPS id f4sm4746385pbc.6.2013.04.02.23.26.56 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:26:58 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 03 Apr 2013 15:32:58 +0900 Message-Id: <20130403063258.2500.17414.sendpatchset@w520> In-Reply-To: <20130403063246.2500.65318.sendpatchset@w520> References: <20130403063246.2500.65318.sendpatchset@w520> Subject: [PATCH 01/04] ARM: shmobile: r8a7740 pinmux platform device cleanup X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130403_022702_225348_D5AC21FA X-CRM114-Status: GOOD ( 10.50 ) 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.47 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() and platform_device_register_simple() to save a couple of lines of code. Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/setup-r8a7740.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) --- 0001/arch/arm/mach-shmobile/setup-r8a7740.c +++ work/arch/arm/mach-shmobile/setup-r8a7740.c 2013-04-03 15:01:50.000000000 +0900 @@ -70,29 +70,15 @@ void __init r8a7740_map_io(void) } /* PFC */ -static struct resource r8a7740_pfc_resources[] = { - [0] = { - .start = 0xe6050000, - .end = 0xe6057fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = 0xe605800c, - .end = 0xe605802b, - .flags = IORESOURCE_MEM, - } -}; - -static struct platform_device r8a7740_pfc_device = { - .name = "pfc-r8a7740", - .id = -1, - .resource = r8a7740_pfc_resources, - .num_resources = ARRAY_SIZE(r8a7740_pfc_resources), +static const struct resource pfc_resources[] = { + DEFINE_RES_MEM(0xe6050000, 0x8000), + DEFINE_RES_MEM(0xe605800c, 0x0020), }; void __init r8a7740_pinmux_init(void) { - platform_device_register(&r8a7740_pfc_device); + platform_device_register_simple("pfc-r8a7740", -1, pfc_resources, + ARRAY_SIZE(pfc_resources)); } static struct renesas_intc_irqpin_config irqpin0_platform_data = {