Commit 6d56b9d65813dd6a184efc5e7955d7e181a853c0

Authored by Uwe Kleine-König
Committed by David Woodhouse
1 parent ce4bbeeddb

mtd: mark const init data with __initconst instead of __initdata

As long as there is no other non-const variable marked __initdata in the
same compilation unit it doesn't hurt. If there were one however
compilation would fail with

	error: $variablename causes a section type conflict

because a section containing const variables is marked read only and so
cannot contain non-const variables.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/mtd/maps/wr_sbc82xx_flash.c
... ... @@ -59,7 +59,7 @@
59 59 }
60 60 };
61 61  
62   -static const char *part_probes[] __initdata = {"cmdlinepart", "RedBoot", NULL};
  62 +static const char *part_probes[] __initconst = {"cmdlinepart", "RedBoot", NULL};
63 63  
64 64 #define init_sbc82xx_one_flash(map, br, or) \
65 65 do { \