]> git.baikalelectronics.ru Git - kernel.git/commit
[media] af9005, af9015: use symbolic names for USB id table indices
authorJonathan Nieder <jrnieder@gmail.com>
Sat, 7 Jan 2012 07:11:27 +0000 (04:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 11 Jan 2012 00:46:14 +0000 (22:46 -0200)
commitdfdbd1d9f8c8d18d52e0e0d8e4ced276bce1ffbd
tree0f63c671c433658d8c4c7d77ae8ce5c99b92afc1
parent06df24e20675df7605e941241fbf053441447f02
[media] af9005, af9015: use symbolic names for USB id table indices

The af9005_properties and af9015_properties tables make use of USB ids
from the USB id tables with hardcoded indices, as in
"&af9015_usb_table[30]".  Adding new entries before the end breaks
such references, so everyone has had to carefully tiptoe to only add
entries at the end of the list.

In the spirit of "dw2102: use symbolic names for dw2102_table
indices", use C99-style initializers with symbolic names for each
index to avoid this.  In the new regime, properties tables referring
to the USB ids have names like "&af9015_usb_table[CINERGY_T_STICK_RC]"
that do not change meaning when items in the USB id table are
reordered.

Encouraged-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Luca Olivetti <luca@ventoso.org>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/af9005.c
drivers/media/dvb/dvb-usb/af9015.c