Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6a59d64c authored by Trent Piepho's avatar Trent Piepho Committed by Mauro Carvalho Chehab
Browse files

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: default avatarTrent Piepho <xyzzy@speakeasy.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent b09a79f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment