]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/zorro/zorro.c
zorro: Do not allocate zorro_autocon[] statically
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sat, 29 Jun 2013 08:40:20 +0000 (10:40 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 26 Nov 2013 10:09:03 +0000 (11:09 +0100)
commitc293738e6d8dfb9c941759855b5161fde449644d
tree3c2d4b2041af3e2fe5a8a4702cdfe49fca3e1f7f
parent1ea636eb68322198e08aebdede141244d98e8299
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 <geert@linux-m68k.org>
arch/m68k/amiga/config.c
arch/m68k/amiga/platform.c
drivers/zorro/zorro.c
include/linux/zorro.h