Commit 122dbe7e58c7d064a17eefd33205227e6bce85ca

Authored by Uwe Kleine-König
Committed by Linus Walleij
1 parent eb181c3533

pinctrl: 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>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Showing 2 changed files with 3 additions and 3 deletions Side-by-side Diff

Documentation/pinctrl.txt
... ... @@ -786,7 +786,7 @@
786 786  
787 787 #include <linux/pinctrl/machine.h>
788 788  
789   -static const struct pinctrl_map __initdata mapping[] = {
  789 +static const struct pinctrl_map mapping[] __initconst = {
790 790 {
791 791 .dev_name = "foo-spi.0",
792 792 .name = PINCTRL_STATE_DEFAULT,
drivers/pinctrl/pinctrl-coh901.c
... ... @@ -174,7 +174,7 @@
174 174  
175 175  
176 176 /* Initial configuration */
177   -static const struct __initdata u300_gpio_confdata
  177 +static const struct __initconst u300_gpio_confdata
178 178 bs335_gpio_config[BS335_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
179 179 /* Port 0, pins 0-7 */
180 180 {
... ... @@ -255,7 +255,7 @@
255 255 }
256 256 };
257 257  
258   -static const struct __initdata u300_gpio_confdata
  258 +static const struct __initconst u300_gpio_confdata
259 259 bs365_gpio_config[BS365_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
260 260 /* Port 0, pins 0-7 */
261 261 {