mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-26 19:36:41 +00:00
85b9b8a444
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>
56 lines
1.8 KiB
C
56 lines
1.8 KiB
C
/*
|
|
* Zoran zr36057/zr36067 PCI controller driver, for the
|
|
* Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux
|
|
* Media Labs LML33/LML33R10.
|
|
*
|
|
* This part handles card-specific data and detection
|
|
*
|
|
* Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
|
|
*
|
|
* Currently maintained by:
|
|
* Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
* Laurent Pinchart <laurent.pinchart@skynet.be>
|
|
* Mailinglist <mjpeg-users@lists.sf.net>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#ifndef __ZORAN_CARD_H__
|
|
#define __ZORAN_CARD_H__
|
|
|
|
extern int zr36067_debug;
|
|
|
|
#define dprintk(num, format, args...) \
|
|
do { \
|
|
if (zr36067_debug >= num) \
|
|
printk(format, ##args); \
|
|
} while (0)
|
|
|
|
/* Anybody who uses more than four? */
|
|
#define BUZ_MAX 4
|
|
extern int zoran_num;
|
|
extern struct zoran *zoran[BUZ_MAX];
|
|
|
|
extern struct video_device zoran_template;
|
|
|
|
extern int zoran_check_jpg_settings(struct zoran *zr,
|
|
struct zoran_jpg_settings *settings);
|
|
extern void zoran_open_init_params(struct zoran *zr);
|
|
extern void zoran_vdev_release(struct video_device *vdev);
|
|
|
|
void zr36016_write(struct videocodec *codec, u16 reg, u32 val);
|
|
|
|
#endif /* __ZORAN_CARD_H__ */
|