From patchwork Tue Apr 2 04:19:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2374151 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 49B4A3FDDA for ; Tue, 2 Apr 2013 04:21:48 +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 1UMsgu-00039V-NQ; Tue, 02 Apr 2013 04:19:24 +0000 Received: from mail-da0-x22f.google.com ([2607:f8b0:400e:c00::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UMsgr-00038M-Ir for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2013 04:19:22 +0000 Received: by mail-da0-f47.google.com with SMTP id s35so7833dak.20 for ; Mon, 01 Apr 2013 21:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:sender:message-id:to:cc:in-reply-to:references:from :subject:mime-version:content-type; bh=X7qODQ0zc+W1fJKGewa9wYy9cDU4uzVJlKOCo1UDpIQ=; b=sQ1DM2xjwttJMc6gfXQgUUaqMRN2EwTz+V3RVjim7C6Oi3XuRUl54SZm1sy68heXmZ 0rc8P3R/S98uu4d4QH8F3uga0dewG8VVefQdFknEnOHy3HqLtF7Jf8XSa71F23LxGiy9 A5hkam999ysqZ/50lqEi1vtRYW/mdwbw2lrbDxrD74wt7Qy9YTFx5ENiv34C+UZ5MnfI tEGSh4ih/7UqPvs6F8h21knFyM0u4B4n48AVgB8kdXToPXgRuiotZR30wg9MYfUru4Co XvCHxiD5/BmLfdGv+6mV1gui5je2U3QvKVogvNMolYdPIZ5DnSTHQLERJUtQzcJi4hxz 8e/A== X-Received: by 10.68.237.100 with SMTP id vb4mr22109998pbc.202.1364876358651; Mon, 01 Apr 2013 21:19:18 -0700 (PDT) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id fk1sm16266064pbd.36.2013.04.01.21.19.15 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 01 Apr 2013 21:19:17 -0700 (PDT) Date: Mon, 01 Apr 2013 21:19:17 -0700 (PDT) Message-ID: <87r4it5zum.wl%kuninori.morimoto.gx@renesas.com> To: Paul , Simon , arnd@arndb.de In-Reply-To: <87sj395zvv.wl%kuninori.morimoto.gx@renesas.com> References: <87zjxvewko.wl%kuninori.morimoto.gx@renesas.com> <87fvzb56n3.wl%kuninori.morimoto.gx@renesas.com> <87sj395zvv.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/5 v3] ARM: shmobile: r8a7778: remove pointless PLATFORM_INFO() MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130402_001921_734889_DFF2FE51 X-CRM114-Status: GOOD ( 11.94 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (kuninori.morimoto.gx[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_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: Magnus , Kuninori Morimoto , linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org remove pointless PLATFORM_INFO() macro from setup-r8a7778, and, used original platform_device_register_xxx() Signed-off-by: Kuninori Morimoto --- v2 -> v3 - no change arch/arm/mach-shmobile/setup-r8a7778.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 01c62be..57d6b0e 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c @@ -78,21 +78,13 @@ static struct sh_timer_config sh_tmu1_platform_data = { .clocksource_rating = 200, }; -#define PLATFORM_INFO(n, i) \ -{ \ - .parent = &platform_bus, \ - .name = #n, \ - .id = i, \ - .res = n ## i ## _resources, \ - .num_res = ARRAY_SIZE(n ## i ##_resources), \ - .data = &n ## i ##_platform_data, \ - .size_data = sizeof(n ## i ## _platform_data), \ -} - -struct platform_device_info platform_devinfo[] = { - PLATFORM_INFO(sh_tmu, 0), - PLATFORM_INFO(sh_tmu, 1), -}; +#define r8a7778_register_tmu(idx) \ + platform_device_register_resndata( \ + &platform_bus, "sh_tmu", idx, \ + sh_tmu##idx##_resources, \ + ARRAY_SIZE(sh_tmu##idx##_resources), \ + &sh_tmu##idx##_platform_data, \ + sizeof(sh_tmu##idx##_platform_data)) void __init r8a7778_add_standard_devices(void) { @@ -114,8 +106,8 @@ void __init r8a7778_add_standard_devices(void) &scif_platform_data[i], sizeof(struct plat_sci_port)); - for (i = 0; i < ARRAY_SIZE(platform_devinfo); i++) - platform_device_register_full(&platform_devinfo[i]); + r8a7778_register_tmu(0); + r8a7778_register_tmu(1); } #define INT2SMSKCR0 0x82288 /* 0xfe782288 */