From patchwork Wed Apr 3 06:33:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2385141 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 CF871DFB79 for ; Wed, 3 Apr 2013 06:34:40 +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 1UNHEP-00068N-Nd; Wed, 03 Apr 2013 06:31:38 +0000 Received: from mail-pd0-f172.google.com ([209.85.192.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNHAR-0003My-SP for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2013 06:27:32 +0000 Received: by mail-pd0-f172.google.com with SMTP id 5so668635pdd.31 for ; Tue, 02 Apr 2013 23:27:29 -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=8JEwwz2DdpNansB6WfbxsW5a/4QHBCGTFE8M96escMY=; b=J+O0570rt0PS5Ky6DR3IKpWN8XWZX7qSJeH9DqwwE/rCPWQQ5oKr8ZHebq7XANi18Q 0Qu+pgyuroUxwBpBSRY8O/QLZ2A618GHl25gwCcgG5kGSs9zsLPqsSQxrLZADbChEEBy RIIaPhweAfk6yXDmDbRgyGuw9d5j3HdArd1CXM45+4/bcdkWv8tZc3G3mBPDn6CXklAw NbQqJqB4iiLgABsD4UQhQU8sGL5woDvVajFmLAug4oC47v0ESaYQGm6VxpX8gj/QoXwo 1gaQfGuXdgzsxd4Uody3o7CTy7RgLoHpuoNLRjPMSZpJ/jaKmoPM/YGgI722JOV5Bpc/ BSfA== X-Received: by 10.66.27.136 with SMTP id t8mr1262917pag.209.1364970449475; Tue, 02 Apr 2013 23:27:29 -0700 (PDT) Received: from [127.0.0.1] (FLH1All083.tky.mesh.ad.jp. [211.13.49.83]) by mx.google.com with ESMTPS id g8sm3112706pae.7.2013.04.02.23.27.26 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:27:28 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 03 Apr 2013 15:33:28 +0900 Message-Id: <20130403063328.2500.86264.sendpatchset@w520> In-Reply-To: <20130403063246.2500.65318.sendpatchset@w520> References: <20130403063246.2500.65318.sendpatchset@w520> Subject: [PATCH 04/04] ARM: shmobile: sh73a0 pinmux platform device cleanup X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130403_022732_016818_D08CD112 X-CRM114-Status: UNSURE ( 9.74 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.172 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-sh73a0.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) --- 0001/arch/arm/mach-shmobile/setup-sh73a0.c +++ work/arch/arm/mach-shmobile/setup-sh73a0.c 2013-04-03 15:19:37.000000000 +0900 @@ -61,29 +61,16 @@ void __init sh73a0_map_io(void) iotable_init(sh73a0_io_desc, ARRAY_SIZE(sh73a0_io_desc)); } -static struct resource sh73a0_pfc_resources[] = { - [0] = { - .start = 0xe6050000, - .end = 0xe6057fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = 0xe605801c, - .end = 0xe6058027, - .flags = IORESOURCE_MEM, - } -}; - -static struct platform_device sh73a0_pfc_device = { - .name = "pfc-sh73a0", - .id = -1, - .resource = sh73a0_pfc_resources, - .num_resources = ARRAY_SIZE(sh73a0_pfc_resources), +/* PFC */ +static const struct resource pfc_resources[] = { + DEFINE_RES_MEM(0xe6050000, 0x8000), + DEFINE_RES_MEM(0xe605801c, 0x000c), }; void __init sh73a0_pinmux_init(void) { - platform_device_register(&sh73a0_pfc_device); + platform_device_register_simple("pfc-sh73a0", -1, pfc_resources, + ARRAY_SIZE(pfc_resources)); } static struct plat_sci_port scif0_platform_data = {