kernel-ark/drivers
Trent Piepho c682b3a7fb V4L/DVB (5517): Usbvision: store the device database more efficiently
One bit wide bitfields need to declared unsigned to have the range 0 to
1, or they have the range -1 to 0.

A few techniques to reduce the driver's size by about 1700 bytes on ia32,
probably more on x86-64.

Put the biggest fields first, less padding is necessary that way.

Put fields with a limited range into a smaller type.  For example
VideoChannels will fit in 3 bits, and TunerType can use 8 bits.

Vin_Reg1, Vin_Reg2, and Dvi_yuv define values for 8-bit registers, but
they can't just go into an 8-bit field with no changes, since -1 was used
as a flag to indicate a value was not present.  So what we do is create a
one-bit flag for each one to indicate if a value is or is not present.

This only takes 9 bits and has the added advantage that when the register
isn't overridden (Vin_Reg[12] never are) it doesn't need to appear in the
structure definition since the default value for the flag will be zero.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:45:34 -03:00
..
acorn
acpi
amba
ata
atm [ATM]: Use mutex instead of binary semaphore in FORE Systems 200E-series driver 2007-04-26 01:41:49 -07:00
auxdisplay
base
block
bluetooth [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
cdrom
char [NET]: random functions can use nsec resolution instead of usec 2007-04-25 22:28:25 -07:00
clocksource
connector [NETLINK]: Switch cb_lock spinlock to mutex and allow to override it 2007-04-25 22:29:03 -07:00
cpufreq
crypto
dio
dma
edac
eisa
fc4
firmware
hid
hwmon
i2c
ide
ieee1394
infiniband Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband 2007-04-27 09:39:27 -07:00
input
isdn [SK_BUFF]: Introduce skb_copy_to_linear_data{_offset} 2007-04-25 22:28:29 -07:00
kvm
leds
macintosh
mca
md
media V4L/DVB (5517): Usbvision: store the device database more efficiently 2007-04-27 15:45:34 -03:00
message [SK_BUFF]: Introduce skb_copy_from_linear_data{_offset} 2007-04-25 22:28:23 -07:00
mfd
misc
mmc
mtd Merge branch 'for-linus' of git://git.infradead.org/ubi-2.6 2007-04-27 10:42:35 -07:00
net Merge branch 'e1000-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 2007-04-27 10:14:53 -07:00
nubus
oprofile
parisc [NET]: Inline net_device_stats 2007-04-25 22:28:26 -07:00
parport
pci
pcmcia
pnp
ps3
rapidio
rtc
s390 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-27 09:26:46 -07:00
sbus [OPENPROM]: Use pci_device_to_OF_node(). 2007-04-26 01:54:59 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-27 09:29:04 -07:00
serial [SPARC/64] constify of_get_property return: drivers 2007-04-26 01:54:27 -07:00
sh
sn
spi
tc
telephony
usb [SK_BUFF]: Introduce skb_copy_to_linear_data{_offset} 2007-04-25 22:28:29 -07:00
video [IGAFB]: Use pci_device_to_OF_node() on sparc. 2007-04-26 01:55:03 -07:00
w1
zorro
Kconfig
Makefile