Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion mfd: mark const init data with __initconst instead of __initdata

Received: by 10.68.236.170 with SMTP id uv10mr1262935pbc.4.1333056008341;
        Thu, 29 Mar 2012 14:20:08 -0700 (PDT)
Path: z9ni16292pbe.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod
From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?=  	<u.kleine-koe...@pengutronix.de>
Newsgroups: linux.kernel
Subject: [PATCH 07/17] mfd: mark const init data with __initconst instead of __initdata
Date: Thu, 29 Mar 2012 23:20:04 +0200
Message-ID: <iKuVe-GP-71@gated-at.bofh.it>
References: <iKuVb-GP-3@gated-at.bofh.it>
X-Original-To: linux-ker...@vger.kernel.org,
	Andrew Morton <a...@linux-foundation.org>
X-Mailer: git-send-email 1.7.9.1
MIME-Version: 1.0
X-Sa-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c
X-Sa-Exim-Mail-From: u...@pengutronix.de
X-Sa-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
X-Ptx-Original-Recipient: linux-ker...@vger.kernel.org
Sender: robo...@news.nic.it
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
Approved: robo...@news.nic.it
Lines: 36
Organization: linux.* mail to news gateway
X-Original-Cc: ker...@pengutronix.de, Samuel Ortiz <sa...@linux.intel.com>
X-Original-Date: Thu, 29 Mar 2012 23:12:24 +0200
X-Original-Message-ID: <1333055554-31300-7-git-send-email-u.kleine-koenig@pengutronix.de>
X-Original-References: <20120329211131.GA31...@pengutronix.de>
X-Original-Sender: linux-kernel-ow...@vger.kernel.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

	error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König <u.kleine-koe...@pengutronix.de>
Cc: Samuel Ortiz <sa...@linux.intel.com>
---
 drivers/mfd/ab5500-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/ab5500-core.c b/drivers/mfd/ab5500-core.c
index 54d0fe4..3765c76 100644
--- a/drivers/mfd/ab5500-core.c
+++ b/drivers/mfd/ab5500-core.c
@@ -1291,7 +1291,7 @@ struct ab_family_id {
 	char	*name;
 };
 
-static const struct ab_family_id ids[] __initdata = {
+static const struct ab_family_id ids[] __initconst = {
 	/* AB5500 */
 	{
 		.id = AB5500_1_0,
-- 
1.7.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/