From patchwork Wed Nov 20 03:19:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 3210371 Return-Path: X-Original-To: patchwork-ltsi-dev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 78371C045B for ; Wed, 20 Nov 2013 06:53:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A85A62068D for ; Wed, 20 Nov 2013 06:53:48 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by mail.kernel.org (Postfix) with ESMTP id DE0852068B for ; Wed, 20 Nov 2013 06:53:47 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [IPv6:::1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 2F124FCF; Wed, 20 Nov 2013 06:52:20 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp2.linuxfoundation.org (smtp2.linux-foundation.org [172.17.192.36]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7C2C8EA2 for ; Wed, 20 Nov 2013 06:51:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from kirsty.vergenet.net (kirsty.vergenet.net [202.4.237.240]) by smtp2.linuxfoundation.org (Postfix) with ESMTP id BC60F1DD76 for ; Wed, 20 Nov 2013 06:51:42 +0000 (UTC) Received: from ayumi.isobedori.kobe.vergenet.net (p2020-ipbfp1604kobeminato.hyogo.ocn.ne.jp [114.154.85.20]) by kirsty.vergenet.net (Postfix) with ESMTP id 336F4267324; Wed, 20 Nov 2013 14:23:06 +1100 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id 7ADD16CE6C1; Wed, 20 Nov 2013 12:23:04 +0900 (JST) From: Simon Horman To: ltsi-dev@lists.linuxfoundation.org Date: Wed, 20 Nov 2013 12:19:06 +0900 Message-Id: <1384917713-15962-429-git-send-email-horms+renesas@verge.net.au> X-Mailer: git-send-email 1.8.4 In-Reply-To: <1384917713-15962-1-git-send-email-horms+renesas@verge.net.au> References: <1384917713-15962-1-git-send-email-horms+renesas@verge.net.au> X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Cc: Magnus Damm Subject: [LTSI-dev] [PATCH ltsi-3.10 428/595] ARM: shmobile: ape6evm: add "__initconst" annotations where needed X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP From: Guennadi Liakhovetski 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. Reported-by: Sergei Shtylyov Signed-off-by: Guennadi Liakhovetski Signed-off-by: Simon Horman (cherry picked from commit 23f1751c5fef5c33e6a58ed2448774aeae436a39) Signed-off-by: Simon Horman --- arch/arm/mach-shmobile/board-ape6evm.c | 18 +++++++++--------- 1 file 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"),