aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/ti/composite.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-02-18 04:59:45 -0500
committerMichael Turquette <mturquette@linaro.org>2015-04-12 20:18:27 -0400
commit692d8328e8c039f9497eb862c6cf835de922c061 (patch)
treebb58cdf8ee1f91581681ce69013e9e280b0fe56f /drivers/clk/ti/composite.c
parentf6194213cbe871341cd5dfcfe31b4de78ef9503f (diff)
clk: don't use __initconst for non-const arrays
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 <u.kleine-koenig@pengutronix.de> Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'drivers/clk/ti/composite.c')
-rw-r--r--drivers/clk/ti/composite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/ti/composite.c b/drivers/clk/ti/composite.c
index 3654f61912eb..96f83cedb4b3 100644
--- a/drivers/clk/ti/composite.c
+++ b/drivers/clk/ti/composite.c
@@ -69,7 +69,7 @@ struct component_clk {
69 struct list_head link; 69 struct list_head link;
70}; 70};
71 71
72static const char * __initconst component_clk_types[] = { 72static const char * const component_clk_types[] __initconst = {
73 "gate", "divider", "mux" 73 "gate", "divider", "mux"
74}; 74};
75 75