From patchwork Mon Apr 1 02:26:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2369001 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 4236EDF264 for ; Mon, 1 Apr 2013 02:29:11 +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 1UMUSF-0002bx-JS; Mon, 01 Apr 2013 02:26:39 +0000 Received: from mail-da0-x234.google.com ([2607:f8b0:400e:c00::234]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UMUSC-0002b1-Nj for linux-arm-kernel@lists.infradead.org; Mon, 01 Apr 2013 02:26:37 +0000 Received: by mail-da0-f52.google.com with SMTP id f10so872907dak.39 for ; Sun, 31 Mar 2013 19:26:32 -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=lj08ycXpnPoCafJ6zTUFHy6rpG/XOePd74B0P8WVdPs=; b=Lgcbmcs1p1SdMyVL9TBgF5Nm3/8BxJUm1rv6PVDLXSWzHJxGDaWXS41UFSBzPkesvv q6v6d5NbPEAYrqCUZQyXodugZWp3Lxx1tVzt/bbstiRbpKlLesC5r1sFiLS++oe5USt8 PGrNrbrFJgAglx6vI+8GWvJMm7VIIyon49rE8sNL1FEQy6DChSvA9deBhdJpv/mfnd1h rDoEgcCDVr++P0rON2SiOiYReQ9dvpVxSHNcSh500gVtRB9Yj3RsmHuk8hcca1C40zrt x/UKwCA4ij5/SnOfgu2mXedihY3Npru/mz6qfHsdcdV2YD/UogFMg9tmNYWtSG8B6YAC I8Rw== X-Received: by 10.68.241.102 with SMTP id wh6mr15990211pbc.150.1364783192707; Sun, 31 Mar 2013 19:26:32 -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 ve7sm13206304pab.11.2013.03.31.19.26.29 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 31 Mar 2013 19:26:31 -0700 (PDT) Date: Sun, 31 Mar 2013 19:26:31 -0700 (PDT) Message-ID: <87ehev56lo.wl%kuninori.morimoto.gx@renesas.com> To: Paul , Simon , arnd@arndb.de In-Reply-To: <87fvzb56n3.wl%kuninori.morimoto.gx@renesas.com> References: <87zjxvewko.wl%kuninori.morimoto.gx@renesas.com> <87fvzb56n3.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 1/3 v2] 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-20130331_222636_854533_FF132025 X-CRM114-Status: GOOD ( 11.86 ) 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 --- v1 -> v2 - removed PLATFORM_INFO() 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 */