drivers/clk: appropriate __init annotation for const data
authorNicolas Pitre <nicolas.pitre@linaro.org>
Tue, 28 Jul 2015 23:43:20 +0000 (19:43 -0400)
committerStephen Boyd <sboyd@codeaurora.org>
Mon, 24 Aug 2015 23:59:32 +0000 (16:59 -0700)
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>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
[sboyd@codeaurora.org: Dropped hunks that moved const char *
arrays to const char * const]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/versatile/clk-realview.c
drivers/clk/versatile/clk-versatile.c

index 940cc6f14578b6e6fd1e66fd86584750e77e3c83..86f70997d59dce436d34c9c5aef74be0f367f869 100644 (file)
@@ -32,13 +32,13 @@ static const struct icst_params realview_oscvco_params = {
        .idx2s          = icst307_idx2s,
 };
 
-static const struct clk_icst_desc __initdata realview_osc0_desc = {
+static const struct clk_icst_desc realview_osc0_desc __initconst = {
        .params = &realview_oscvco_params,
        .vco_offset = REALVIEW_SYS_OSC0_OFFSET,
        .lock_offset = REALVIEW_SYS_LOCK_OFFSET,
 };
 
-static const struct clk_icst_desc __initdata realview_osc4_desc = {
+static const struct clk_icst_desc realview_osc4_desc __initconst = {
        .params = &realview_oscvco_params,
        .vco_offset = REALVIEW_SYS_OSC4_OFFSET,
        .lock_offset = REALVIEW_SYS_LOCK_OFFSET,
index 71fa5da89afdb44f7b90c929bf39672f7f4047f0..a89a927567e0cfae45df95b8aed7cc2218509fc3 100644 (file)
@@ -33,7 +33,7 @@ static const struct icst_params cp_auxosc_params = {
        .idx2s          = icst525_idx2s,
 };
 
-static const struct clk_icst_desc __initdata cm_auxosc_desc = {
+static const struct clk_icst_desc cm_auxosc_desc __initconst = {
        .params = &cp_auxosc_params,
        .vco_offset = 0x1c,
        .lock_offset = INTEGRATOR_HDR_LOCK_OFFSET,