From 692d8328e8c039f9497eb862c6cf835de922c061 Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Wed, 18 Feb 2015 10:59:45 +0100 Subject: clk: don't use __initconst for non-const arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The statement static const char *name[]; defines a modifiable array of pointers to constant chars. That is *name[0] = 'f'; is forbidden, but name[0] = "f"; is not. So marking an array that is defined as above with __initconst is wrong. Either an additional const must be added such that the whole definition reads: static const char *const name[] __initconst; or where this is not possible __initdata must be used. Signed-off-by: Uwe Kleine-König Signed-off-by: Michael Turquette --- drivers/clk/pxa/clk-pxa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/clk/pxa') diff --git a/drivers/clk/pxa/clk-pxa.h b/drivers/clk/pxa/clk-pxa.h index 323965430111..b04c5b9c0ea8 100644 --- a/drivers/clk/pxa/clk-pxa.h +++ b/drivers/clk/pxa/clk-pxa.h @@ -14,7 +14,7 @@ #define _CLK_PXA_ #define PARENTS(name) \ - static const char *name ## _parents[] __initconst + static const char *name ## _parents[] __initdata #define MUX_RO_RATE_RO_OPS(name, clk_name) \ static struct clk_hw name ## _mux_hw; \ static struct clk_hw name ## _rate_hw; \ -- cgit v1.2.3