mach-imx/mach-imx6ul.c: proper constness with __initconst
authorNicolas Pitre <nicolas.pitre@linaro.org>
Sun, 22 Nov 2015 01:35:31 +0000 (20:35 -0500)
committerShawn Guo <shawnguo@kernel.org>
Wed, 25 Nov 2015 03:06:52 +0000 (11:06 +0800)
Both the pointer array and the pointed data have to be const when using
__initconst to be correct.  This also fixes LTO builds that otherwise
fail with section mismatch errors.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/mach-imx6ul.c

index acaf7056efa57be734cd5e447b5bae6d744b5b68..a38b16b699233b2b0948250efe32a030388b2e2a 100644 (file)
@@ -84,7 +84,7 @@ static void __init imx6ul_init_late(void)
                platform_device_register_simple("imx6q-cpufreq", -1, NULL, 0);
 }
 
-static const char *imx6ul_dt_compat[] __initconst = {
+static const char * const imx6ul_dt_compat[] __initconst = {
        "fsl,imx6ul",
        NULL,
 };