From c293738e6d8dfb9c941759855b5161fde449644d Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sat, 29 Jun 2013 10:40:20 +0200 Subject: zorro: Do not allocate zorro_autocon[] statically Currently the array of Zorro devices is allocated statically, wasting up to 4.5 KiB when running an Amiga or multi-platform kernel on a machine with no or a handful of Zorro expansion cards. Convert it to conditional dynamic memory allocation to fix this. amiga_parse_bootinfo() still needs to store some information about the detected Zorro devices, at a time even the bootmem allocator is not yet available. This is now handled using a much smaller array (typically less than 0.5 KiB), which is __initdata and thus freed later. Signed-off-by: Geert Uytterhoeven --- arch/m68k/amiga/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/m68k/amiga/platform.c') diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c index dacd9f911f7..7847b2b1b5b 100644 --- a/arch/m68k/amiga/platform.c +++ b/arch/m68k/amiga/platform.c @@ -67,8 +67,8 @@ static int __init z_dev_present(zorro_id id) unsigned int i; for (i = 0; i < zorro_num_autocon; i++) - if (zorro_autocon[i].rom.er_Manufacturer == ZORRO_MANUF(id) && - zorro_autocon[i].rom.er_Product == ZORRO_PROD(id)) + if (zorro_autocon_init[i].rom.er_Manufacturer == ZORRO_MANUF(id) && + zorro_autocon_init[i].rom.er_Product == ZORRO_PROD(id)) return 1; return 0; -- cgit v1.2.3-70-g09d2