android_kernel_samsung_msm8976/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 acpi-thermal: fix mod_timer() interval 2007-04-24 08:23:08 -07:00
amba
ata pata_sis: Fix oops on boot 2007-04-19 19:20:52 -04:00
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 [SK_BUFF]: Introduce skb_reset_network_header(skb) 2007-04-25 22:24:46 -07:00
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 hwmon/w83627ehf: Don't redefine REGION_OFFSET 2007-04-24 08:23:08 -07:00
i2c
ide ide/Kconfig: add missing range check for IDE_MAX_HWIFS 2007-04-20 22:16:58 +02:00
ieee1394 [SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph 2007-04-25 22:25:10 -07:00
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 KVM: Fix off-by-one when writing to a nonpae guest pde 2007-04-19 18:39:26 +03:00
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 [PARPORT] SUNBPP: Fix OOPS when debugging is enabled. 2007-04-23 23:33:17 -07:00
pci Revert "adjust legacy IDE resource setting (v2)" 2007-04-23 23:19:36 +02:00
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