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/mxs/clk-imx23.c | 12 ++++++------ drivers/clk/mxs/clk-imx28.c | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'drivers/clk/mxs') diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c index 9fc9359f5133..22d136aa699f 100644 --- a/drivers/clk/mxs/clk-imx23.c +++ b/drivers/clk/mxs/clk-imx23.c @@ -77,12 +77,12 @@ static void __init clk_misc_init(void) writel_relaxed(30 << BP_FRAC_IOFRAC, FRAC + SET); } -static const char *sel_pll[] __initconst = { "pll", "ref_xtal", }; -static const char *sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; -static const char *sel_pix[] __initconst = { "ref_pix", "ref_xtal", }; -static const char *sel_io[] __initconst = { "ref_io", "ref_xtal", }; -static const char *cpu_sels[] __initconst = { "cpu_pll", "cpu_xtal", }; -static const char *emi_sels[] __initconst = { "emi_pll", "emi_xtal", }; +static const char *sel_pll[] __initdata = { "pll", "ref_xtal", }; +static const char *sel_cpu[] __initdata = { "ref_cpu", "ref_xtal", }; +static const char *sel_pix[] __initdata = { "ref_pix", "ref_xtal", }; +static const char *sel_io[] __initdata = { "ref_io", "ref_xtal", }; +static const char *cpu_sels[] __initdata = { "cpu_pll", "cpu_xtal", }; +static const char *emi_sels[] __initdata = { "emi_pll", "emi_xtal", }; enum imx23_clk { ref_xtal, pll, ref_cpu, ref_emi, ref_pix, ref_io, saif_sel, diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c index a6c35010e4e5..b1be3746ce95 100644 --- a/drivers/clk/mxs/clk-imx28.c +++ b/drivers/clk/mxs/clk-imx28.c @@ -125,15 +125,15 @@ static void __init clk_misc_init(void) writel_relaxed(val, FRAC0); } -static const char *sel_cpu[] __initconst = { "ref_cpu", "ref_xtal", }; -static const char *sel_io0[] __initconst = { "ref_io0", "ref_xtal", }; -static const char *sel_io1[] __initconst = { "ref_io1", "ref_xtal", }; -static const char *sel_pix[] __initconst = { "ref_pix", "ref_xtal", }; -static const char *sel_gpmi[] __initconst = { "ref_gpmi", "ref_xtal", }; -static const char *sel_pll0[] __initconst = { "pll0", "ref_xtal", }; -static const char *cpu_sels[] __initconst = { "cpu_pll", "cpu_xtal", }; -static const char *emi_sels[] __initconst = { "emi_pll", "emi_xtal", }; -static const char *ptp_sels[] __initconst = { "ref_xtal", "pll0", }; +static const char *sel_cpu[] __initdata = { "ref_cpu", "ref_xtal", }; +static const char *sel_io0[] __initdata = { "ref_io0", "ref_xtal", }; +static const char *sel_io1[] __initdata = { "ref_io1", "ref_xtal", }; +static const char *sel_pix[] __initdata = { "ref_pix", "ref_xtal", }; +static const char *sel_gpmi[] __initdata = { "ref_gpmi", "ref_xtal", }; +static const char *sel_pll0[] __initdata = { "pll0", "ref_xtal", }; +static const char *cpu_sels[] __initdata = { "cpu_pll", "cpu_xtal", }; +static const char *emi_sels[] __initdata = { "emi_pll", "emi_xtal", }; +static const char *ptp_sels[] __initdata = { "ref_xtal", "pll0", }; enum imx28_clk { ref_xtal, pll0, pll1, pll2, ref_cpu, ref_emi, ref_io0, ref_io1, -- cgit v1.2.3-59-g8ed1b