[PATCH 4/4] ARM: shmobile: lager: Make spi_flash_data const
Geert Uytterhoeven
geert at linux-m68k.org
Mon Jan 6 03:09:53 EST 2014
On Mon, Jan 6, 2014 at 3:31 AM, Simon Horman <horms at verge.net.au> wrote:
>> -static struct flash_platform_data spi_flash_data = {
>> +static const struct flash_platform_data spi_flash_data = {
>> .name = "m25p80",
>> .parts = spi_flash_part,
>> .nr_parts = ARRAY_SIZE(spi_flash_part),
>
> Should spi_flash_part also be const?
No, .parts is a non-const pointer (but perhaps it can be made const, but that
may be more invasive, and have side-effects).
> And should flash_platform_data and spi_flash_part be annotated
> as __initconst?
AFAIU, those are not copied.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
More information about the linux-arm-kernel
mailing list