ARM: shmobile: r8a7793: proper constness with __initconst
authorNicolas Pitre <nicolas.pitre@linaro.org>
Sun, 22 Nov 2015 01:41:07 +0000 (20:41 -0500)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 23 Nov 2015 01:13:13 +0000 (17:13 -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.

Fixes: ec60d95b4fac ("ARM: shmobile: Basic r8a7793 SoC support")
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/mach-shmobile/setup-r8a7793.c

index 1d2825cb7a65050bc7b05bed4b200f3e8036349a..5fce87f7f254c2fa4b052c5ab91d11a91e2e3a15 100644 (file)
@@ -19,7 +19,7 @@
 #include "common.h"
 #include "rcar-gen2.h"
 
-static const char *r8a7793_boards_compat_dt[] __initconst = {
+static const char * const r8a7793_boards_compat_dt[] __initconst = {
        "renesas,r8a7793",
        NULL,
 };