diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-02-18 10:59:45 +0100 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2015-04-12 17:18:27 -0700 |
commit | 692d8328e8c039f9497eb862c6cf835de922c061 (patch) | |
tree | bb58cdf8ee1f91581681ce69013e9e280b0fe56f /drivers/clk/zynq/clkc.c | |
parent | f6194213cbe871341cd5dfcfe31b4de78ef9503f (diff) | |
download | linux-692d8328e8c039f9497eb862c6cf835de922c061.tar.gz linux-692d8328e8c039f9497eb862c6cf835de922c061.tar.xz |
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/zynq/clkc.c')
-rw-r--r-- | drivers/clk/zynq/clkc.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c index f870aad57711..40cb113be6af 100644 --- a/drivers/clk/zynq/clkc.c +++ b/drivers/clk/zynq/clkc.c @@ -85,22 +85,22 @@ static DEFINE_SPINLOCK(canmioclk_lock); static DEFINE_SPINLOCK(dbgclk_lock); static DEFINE_SPINLOCK(aperclk_lock); -static const char *armpll_parents[] __initconst = {"armpll_int", "ps_clk"}; -static const char *ddrpll_parents[] __initconst = {"ddrpll_int", "ps_clk"}; -static const char *iopll_parents[] __initconst = {"iopll_int", "ps_clk"}; -static const char *gem0_mux_parents[] __initconst = {"gem0_div1", "dummy_name"}; -static const char *gem1_mux_parents[] __initconst = {"gem1_div1", "dummy_name"}; -static const char *can0_mio_mux2_parents[] __initconst = {"can0_gate", +static const char *armpll_parents[] __initdata = {"armpll_int", "ps_clk"}; +static const char *ddrpll_parents[] __initdata = {"ddrpll_int", "ps_clk"}; +static const char *iopll_parents[] __initdata = {"iopll_int", "ps_clk"}; +static const char *gem0_mux_parents[] __initdata = {"gem0_div1", "dummy_name"}; +static const char *gem1_mux_parents[] __initdata = {"gem1_div1", "dummy_name"}; +static const char *can0_mio_mux2_parents[] __initdata = {"can0_gate", "can0_mio_mux"}; -static const char *can1_mio_mux2_parents[] __initconst = {"can1_gate", +static const char *can1_mio_mux2_parents[] __initdata = {"can1_gate", "can1_mio_mux"}; -static const char *dbg_emio_mux_parents[] __initconst = {"dbg_div", +static const char *dbg_emio_mux_parents[] __initdata = {"dbg_div", "dummy_name"}; -static const char *dbgtrc_emio_input_names[] __initconst = {"trace_emio_clk"}; -static const char *gem0_emio_input_names[] __initconst = {"gem0_emio_clk"}; -static const char *gem1_emio_input_names[] __initconst = {"gem1_emio_clk"}; -static const char *swdt_ext_clk_input_names[] __initconst = {"swdt_ext_clk"}; +static const char *dbgtrc_emio_input_names[] __initdata = {"trace_emio_clk"}; +static const char *gem0_emio_input_names[] __initdata = {"gem0_emio_clk"}; +static const char *gem1_emio_input_names[] __initdata = {"gem1_emio_clk"}; +static const char *swdt_ext_clk_input_names[] __initdata = {"swdt_ext_clk"}; static void __init zynq_clk_register_fclk(enum zynq_clk fclk, const char *clk_name, void __iomem *fclk_ctrl_reg, |