kernel-fxtec-pro1x/drivers/media/video/bt8xx
Trent Piepho 4b10d3b626 V4L/DVB (10568): bttv: dynamically allocate device data
The bttv driver had static array of structures for up to 16 possible bttv
devices, even though few users have more than one or two.  The structures
were quite large and this resulted in a huge BSS segment.

Change the driver to allocate the bttv device data dynamically, which
changes "struct bttv bttvs[BTTV_MAX]" to "struct bttv *bttvs[BTTV_MAX]".
It would be nice to get ride of "bttvs" entirely but there are some
complications with gpio access from the audio & mpeg drivers.

To help bttvs removal along anyway, I changed the open() methods use the
video device's drvdata to get the driver data instead of looking it up in
the bttvs array.  This is also more efficient.  Some WARN_ON()s are added
in cases the device node exists by the bttv device doesn't, which I don't
think should be possible.

The gpio access functions need to check if bttvs[card] is NULL now.  Though
calling them on a non-existent card in the first place is wrong, but hard
to solve given the fundamental problems in how the gpio access code works.

This patch reduces the bss size by 66560 bytes on ia32.  Overall change is a
reduction of 66398 bytes, as the WARN_ON()s add some 198 bytes.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:47 -03:00
..
bt848.h
bttv-audio-hook.c
bttv-audio-hook.h
bttv-cards.c V4L/DVB (10567): bttv: shrink muxsel data in card database 2009-03-30 12:42:47 -03:00
bttv-driver.c V4L/DVB (10568): bttv: dynamically allocate device data 2009-03-30 12:42:47 -03:00
bttv-gpio.c V4L/DVB (9521): V4L: struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-29 17:53:26 -02:00
bttv-i2c.c V4L/DVB (10560): bttv: make tuner card info more consistent 2009-03-30 12:42:46 -03:00
bttv-if.c V4L/DVB (10568): bttv: dynamically allocate device data 2009-03-30 12:42:47 -03:00
bttv-input.c V4L/DVB (8628): bttv: Add support for Encore ENLTV2-FM 2008-10-12 09:36:47 -02:00
bttv-risc.c V4L/DVB (10562): bttv: rework the way digital inputs are indicated 2009-03-30 12:42:47 -03:00
bttv-vbi.c V4L/DVB (10558): bttv: norm value should be unsigned 2009-03-30 12:42:46 -03:00
bttv.h V4L/DVB (10567): bttv: shrink muxsel data in card database 2009-03-30 12:42:47 -03:00
bttvp.h V4L/DVB (10568): bttv: dynamically allocate device data 2009-03-30 12:42:47 -03:00
Kconfig V4L/DVB (8534): remove select's of FW_LOADER 2008-07-27 12:24:37 -03:00
Makefile V4L/DVB(7767): Move tuners to common/tuners 2008-04-29 18:41:37 -03:00