From patchwork Wed Apr 3 06:33:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 2385131 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 31CA9DFB79 for ; Wed, 3 Apr 2013 06:33:38 +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 1UNHDd-0005ZJ-MH; Wed, 03 Apr 2013 06:30:49 +0000 Received: from mail-pa0-f50.google.com ([209.85.220.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UNHAI-0003G1-FZ for linux-arm-kernel@lists.infradead.org; Wed, 03 Apr 2013 06:27:23 +0000 Received: by mail-pa0-f50.google.com with SMTP id bg2so713916pad.23 for ; Tue, 02 Apr 2013 23:27:19 -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=5JwdkkBqgrh4ZL3w99ylSYHKXE20u6EXhNgiz0Eb6rY=; b=XcCcWNX6cu84aVlpWrcRBnMQJJte7nGqRa1SpuVN7KznHcdTt1ezU3msObkSrUiB3Y YB0lYbJO3Wy6pOfAOAPkspd6BCMx6SFujLifWaVIdiwERgXQcYRRftlpI3YmqbhZfkr8 CD9Bwt/zfrDkq8TZPX/LFs7v6myvovjsTdllhd/0xi2IAmTFl3/+wgjmtJhDpBezhx2V +F5kYZOogxlKqi4wAXiLaB6WJ+etNExOETuYHte0esieG/rcU9Gj/irYgUOFttcE+4kf k7C0oAHOxU3Ys+s52eYoLaxkmBzX1jm4w05oB3Wy/rbFMpbr8Bx1kiWnbSI9gcq5HktC AKGQ== X-Received: by 10.68.213.132 with SMTP id ns4mr683002pbc.84.1364970439829; Tue, 02 Apr 2013 23:27:19 -0700 (PDT) Received: from [127.0.0.1] (FLH1All083.tky.mesh.ad.jp. [211.13.49.83]) by mx.google.com with ESMTPS id pa2sm4654074pac.9.2013.04.02.23.27.16 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 23:27:18 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 03 Apr 2013 15:33:18 +0900 Message-Id: <20130403063318.2500.49100.sendpatchset@w520> In-Reply-To: <20130403063246.2500.65318.sendpatchset@w520> References: <20130403063246.2500.65318.sendpatchset@w520> Subject: [PATCH 03/04] ARM: shmobile: sh7372 pinmux platform device cleanup X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130403_022722_615943_4FAA0BBF X-CRM114-Status: GOOD ( 10.39 ) 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.220.50 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-sh7372.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) --- 0001/arch/arm/mach-shmobile/setup-sh7372.c +++ work/arch/arm/mach-shmobile/setup-sh7372.c 2013-04-03 15:17:30.000000000 +0900 @@ -62,29 +62,15 @@ void __init sh7372_map_io(void) } /* PFC */ -static struct resource sh7372_pfc_resources[] = { - [0] = { - .start = 0xe6050000, - .end = 0xe6057fff, - .flags = IORESOURCE_MEM, - }, - [1] = { - .start = 0xe605800c, - .end = 0xe6058027, - .flags = IORESOURCE_MEM, - } -}; - -static struct platform_device sh7372_pfc_device = { - .name = "pfc-sh7372", - .id = -1, - .resource = sh7372_pfc_resources, - .num_resources = ARRAY_SIZE(sh7372_pfc_resources), +static const struct resource pfc_resources[] = { + DEFINE_RES_MEM(0xe6050000, 0x8000), + DEFINE_RES_MEM(0xe605800c, 0x001c), }; void __init sh7372_pinmux_init(void) { - platform_device_register(&sh7372_pfc_device); + platform_device_register_simple("pfc-sh7372", -1, pfc_resources, + ARRAY_SIZE(pfc_resources)); } /* SCIFA0 */