diff mbox

drivers/clk: appropriate __init annotation for const data

Message ID alpine.LFD.2.20.1508191437410.25645@knanqh.ubzr
State Accepted
Commit e3ee276a5a62a1cd06de46aa0c808000d3fef00e
Headers show

Commit Message

Nicolas Pitre Aug. 19, 2015, 6:40 p.m. UTC
On Tue, 11 Aug 2015, Michael Turquette wrote:

> Quoting Nicolas Pitre (2015-07-28 16:43:20)
> > 
> > Init data marked const should be annotated with __initconst for
> > correctness and not __initdata.  This also fixes LTO builds that
> > otherwise fail with section mismatch errors.
> > 
> > Signed-off-by: Nicolas Pitre <nico@linaro.org>
> 
> Thanks for the patch Nico. Applied.


Is it possible for you to amend that patch with the following?


Turns out that sys_parents[] is actually written to.


Nicolas
diff mbox

Patch

diff --git a/drivers/clk/clk-stm32f4.c b/drivers/clk/clk-stm32f4.c
index 5404a001c3..3f6f7ad394 100644
--- a/drivers/clk/clk-stm32f4.c
+++ b/drivers/clk/clk-stm32f4.c
@@ -293,7 +293,7 @@  stm32f4_rcc_lookup_clk(struct of_phandle_args *clkspec, void *data)
 	return clks[i];
 }
 
-static const char *const sys_parents[] __initconst =   { "hsi", NULL, "pll" };
+static const char *sys_parents[] __initdata =   { "hsi", NULL, "pll" };
 
 static const struct clk_div_table ahb_div_table[] = {
 	{ 0x0,   1 }, { 0x1,   1 }, { 0x2,   1 }, { 0x3,   1 },