linux/drivers/media/video/sn9c102
Trent Piepho c680dd6038 V4L/DVB (5502): Sn9c102: more efficient register writing code
There were many places in the driver which had long sequences of constant
register initializations.  These were done with one function call per
register.  The register address and value were immediate values in the
function calls.
This is very inefficient, as each register and value take twice the space
when they are code, as each includes a push instruction to put it on
the stack.  There there is the overhead, both size and time, for a
function call for each register.  It's also quite a few lines of C code
to do this.
The patch creates a function that writes multiple registers from a list,
and a macro that makes it easy to construct a such a list as a const
static local to send to the function.
This gets rid of quite a bit of C code, and shrinks the driver by around
8k, while at the same time being more efficient.
Acked-by: Luca Risolia <luca.risolia@studio.unibo.it>

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:45:27 -03:00
..
Kconfig V4L/DVB (5062): SN9C102 driver updates 2007-02-21 13:34:19 -02:00
Makefile V4L/DVB (5474): SN9C1xx driver updates 2007-04-27 15:45:08 -03:00
sn9c102_config.h V4L/DVB (5062): SN9C102 driver updates 2007-02-21 13:34:19 -02:00
sn9c102_core.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_devtable.h V4L/DVB (5474): SN9C1xx driver updates 2007-04-27 15:45:08 -03:00
sn9c102_hv7131d.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_hv7131r.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_mi0343.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_mi0360.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_ov7630.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_ov7660.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_pas106b.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_pas202bcb.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_sensor.h V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_tas5110c1b.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_tas5110d.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102_tas5130d1b.c V4L/DVB (5502): Sn9c102: more efficient register writing code 2007-04-27 15:45:27 -03:00
sn9c102.h V4L/DVB (5474): SN9C1xx driver updates 2007-04-27 15:45:08 -03:00