V4L/DVB (8499): zr36067: Rework device memory allocation
authorJean Delvare <khali@linux-fr.org>
Mon, 14 Jul 2008 12:51:03 +0000 (09:51 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 26 Jul 2008 16:18:27 +0000 (13:18 -0300)
commit85b9b8a444413ea5706096df13012520ed6c5103
tree00ec051e365b13c2c6937c29c1cb08f9571965d0
parent54812c77bc830e2dbcb62b4c6d8a9c7f97cfdd1b
V4L/DVB (8499): zr36067: Rework device memory allocation

Allocate zoran devices dynamically. Currently, the zr36067 driver
stores the device structures in a global array, with room for 4
devices. This makes the bss section very large (90 kB!), and given
that most users, I suspect, have only one zoran device, this is a
waste of kernel memory. Allocating the memory dynamically lets us use
only the amount of memory we need.

Before:
   text    data     bss     dec     hex filename
  64754    9230   90224  164208   28170 drivers/media/video/zr36067.o

After:
   text    data     bss     dec     hex filename
  64866    9230     112   74208   121e0 drivers/media/video/zr36067.o

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ronald Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/zoran_card.c
drivers/media/video/zoran_card.h
drivers/media/video/zoran_driver.c