From patchwork Thu Aug 1 07:41:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2836845 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EDACF9F9C8 for ; Thu, 1 Aug 2013 07:41:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 118BD202BA for ; Thu, 1 Aug 2013 07:41:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3128202B9 for ; Thu, 1 Aug 2013 07:41:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752353Ab3HAHl1 (ORCPT ); Thu, 1 Aug 2013 03:41:27 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:65179 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065Ab3HAHl0 (ORCPT ); Thu, 1 Aug 2013 03:41:26 -0400 Received: from axis700.grange (dslb-188-109-039-196.pools.arcor-ip.net [188.109.39.196]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0LzWb8-1U0Tho29ek-01541F; Thu, 01 Aug 2013 09:41:23 +0200 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id EB42940BB4; Thu, 1 Aug 2013 09:41:21 +0200 (CEST) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1V4nVh-0000ZF-JC; Thu, 01 Aug 2013 09:41:21 +0200 From: Guennadi Liakhovetski To: linux-sh@vger.kernel.org Cc: Sergei Shtylyov , Laurent Pinchart , Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH v4 1/3] ARM: shmobile: ape6evm: add "__initconst" annotations where needed Date: Thu, 1 Aug 2013 09:41:19 +0200 Message-Id: <1375342881-2155-2-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1375342881-2155-1-git-send-email-g.liakhovetski@gmx.de> References: <1375342881-2155-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:PWE7TdV/Pl8AEmaz1+eTdH/SB6dJP3llWG7Dfki2g5Z qFervMhiWZtDVQD+t/VBseFQsNX+sgca2CLInMd1tMX0j0XBe6 7pw6iE2wdCL7Mn4mbZ+gN9VgwfKKHqWVi7cln5exAOA1pVKewq wiiigiInqS3mbgafscFWAYo8QRbbX8h3IvWyyGGqes60qUiHTw 5gArJcus6aA1Jq0wW9Jlm9hVALh8h3D46DxbpUj7Hs8YupsI1E HpDcneheIv7l8wDpzpuOyHhW+B5gOL/I5eHk6GqrowDNEJDEXM jm+urbvfKAtQRDgdkITVJeAnGFZY2aqwI6yrPRhrxQru2wZ34n 5pxbD2CJUmpPy16GUOFxUa7+AcqKYvQjh6xyFpr/Ezszr8sVa1 KiZtDjzBxOgJQ== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds __initconst markers to the platform data and resources, used on ape6evm as parameters to platform_device_register_resndata(). The data is duplicated inside that function, therefore original data can be discarded after initialisation is completed. Signed-off-by: Guennadi Liakhovetski --- arch/arm/mach-shmobile/board-ape6evm.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index ccf8b04..c5e6cba 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c @@ -44,7 +44,7 @@ static struct regulator_consumer_supply dummy_supplies[] = { }; /* SMSC LAN9220 */ -static const struct resource lan9220_res[] = { +static const struct resource lan9220_res[] __initconst = { DEFINE_RES_MEM(0x08000000, 0x1000), { .start = irq_pin(40), /* IRQ40 */ @@ -52,7 +52,7 @@ static const struct resource lan9220_res[] = { }, }; -static const struct smsc911x_platform_config lan9220_data = { +static const struct smsc911x_platform_config lan9220_data __initconst = { .flags = SMSC911X_USE_32BIT, .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, @@ -73,39 +73,39 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] = }; /* MMCIF */ -static struct sh_mmcif_plat_data mmcif0_pdata = { +static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = { .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, }; -static struct resource mmcif0_resources[] = { +static const struct resource mmcif0_resources[] __initconst = { DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), DEFINE_RES_IRQ(gic_spi(169)), }; /* SDHI0 */ -static struct sh_mobile_sdhi_info sdhi0_pdata = { +static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = { .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ, }; -static struct resource sdhi0_resources[] = { +static const struct resource sdhi0_resources[] __initconst = { DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), DEFINE_RES_IRQ(gic_spi(165)), }; /* SDHI1 */ -static struct sh_mobile_sdhi_info sdhi1_pdata = { +static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = { .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE, .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL, }; -static struct resource sdhi1_resources[] = { +static const struct resource sdhi1_resources[] __initconst = { DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), DEFINE_RES_IRQ(gic_spi(166)), }; -static const struct pinctrl_map ape6evm_pinctrl_map[] = { +static const struct pinctrl_map ape6evm_pinctrl_map[] __initconst = { /* SCIFA0 console */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a73a4", "scifa0_data", "scifa0"),