MIPS: BCM47XX: move constant array from stack
authorHauke Mehrtens <hauke@hauke-m.de>
Sun, 13 Oct 2013 20:56:50 +0000 (22:56 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 22 Jan 2014 19:18:55 +0000 (20:18 +0100)
Move the possible nvram sizes from the stack into the data segment

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6044/

arch/mips/bcm47xx/nvram.c

index b4c585b1c62eb6279504daea7e1f3a2e7d0b777d..085a3ee28d0ba3c97a6c22580373aca28a26c4c1 100644 (file)
 #include <asm/mach-bcm47xx/bcm47xx.h>
 
 static char nvram_buf[NVRAM_SPACE];
+static const u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
 
 static u32 find_nvram_size(u32 end)
 {
        struct nvram_header *header;
-       u32 nvram_sizes[] = {0x8000, 0xF000, 0x10000};
        int i;
 
        for (i = 0; i < ARRAY_SIZE(nvram_sizes); i++) {