clk: don't use __initconst for non-const arrays
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 18 Feb 2015 09:59:45 +0000 (10:59 +0100)
committerMichael Turquette <mturquette@linaro.org>
Mon, 13 Apr 2015 00:18:27 +0000 (17:18 -0700)
commit692d8328e8c039f9497eb862c6cf835de922c061
treebb58cdf8ee1f91581681ce69013e9e280b0fe56f
parentf6194213cbe871341cd5dfcfe31b4de78ef9503f
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>
12 files changed:
drivers/clk/hisilicon/clk-hi3620.c
drivers/clk/hisilicon/clk-hix5hd2.c
drivers/clk/mxs/clk-imx23.c
drivers/clk/mxs/clk-imx28.c
drivers/clk/pxa/clk-pxa.h
drivers/clk/rockchip/clk-rk3188.c
drivers/clk/rockchip/clk-rk3288.c
drivers/clk/rockchip/clk.c
drivers/clk/rockchip/clk.h
drivers/clk/samsung/clk-s5pv210.c
drivers/clk/ti/composite.c
drivers/clk/zynq/clkc.c