linux/drivers/media/video/cx88
Trent Piepho 6a59d64c5c V4L/DVB (6021): cx88: Copy board information into card state
The cx88 driver state stored the ID of the board type in core->board.  Every
time the driver need to get some information about the board configuration, it
uses the board number as an index into board configuration array.

This patch changes it so that the board number is in core->boardnr, and
core->board is a copy of the board configuration information.  This allows
access to board information without the extra indirection.  e.g.
cx88_boards[core->board].mpeg becomes core->board.mpeg.

This has a number of advantages:
- The code is simpler to write.

- It compiles to be smaller and faster, without needing the extra array lookup
  to get at the board information.

- The cx88_boards array no longer needs to be exported to all cx88 modules.

- The boards array can be made const

- It should be possible to avoid keeping the (large) cx88_boards array around
  after the module is loaded.

- If module parameters or eeprom info override some board configuration
  setting, it's not necessary to modify the boards array, which would
  affect all boards of the same type.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:16 -03:00
..
cx88-alsa.c cx88-video build fix 2007-05-07 12:13:04 -07:00
cx88-blackbird.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-cards.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-core.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-dvb.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-i2c.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-input.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-mpeg.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-reg.h [PATCH] v4l: 800: whitespace cleanups 2005-11-09 07:56:20 -08:00
cx88-tvaudio.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-vbi.c V4L/DVB (5102): make videodev to auto-generate standards 2007-02-21 13:34:44 -02:00
cx88-video.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-vp3054-i2c.c V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
cx88-vp3054-i2c.h V4L/DVB (5629): Cx88: VP3054 support can't be a module when cx88 is compiled in 2007-07-18 14:23:11 -03:00
cx88.h V4L/DVB (6021): cx88: Copy board information into card state 2007-10-09 22:05:16 -03:00
Kconfig V4L/DVB (5780): Dvb: Remove static dependencies on dvb-pll 2007-07-18 14:24:16 -03:00
Makefile V4L/DVB (5166): Remove obsolete alias defines of CONFIG_* settings 2007-02-21 13:35:11 -02:00