diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-07-14 09:51:03 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-26 13:18:27 -0300 |
commit | 85b9b8a444413ea5706096df13012520ed6c5103 (patch) | |
tree | 00ec051e365b13c2c6937c29c1cb08f9571965d0 /drivers/media/video/zoran_card.h | |
parent | 54812c77bc830e2dbcb62b4c6d8a9c7f97cfdd1b (diff) |
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>
Diffstat (limited to 'drivers/media/video/zoran_card.h')
-rw-r--r-- | drivers/media/video/zoran_card.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/zoran_card.h b/drivers/media/video/zoran_card.h index 1b5c4171cf9..e4dc9d29b40 100644 --- a/drivers/media/video/zoran_card.h +++ b/drivers/media/video/zoran_card.h @@ -41,7 +41,7 @@ extern int zr36067_debug; /* Anybody who uses more than four? */ #define BUZ_MAX 4 extern int zoran_num; -extern struct zoran zoran[BUZ_MAX]; +extern struct zoran *zoran[BUZ_MAX]; extern struct video_device zoran_template; |