[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)
commitd07b901f9dc22977c2c04f320a9cef19e5298e7e
tree0f63c671c433658d8c4c7d77ae8ce5c99b92afc1
parent7a6f6c29d264cdd2fe0eb3d923217eed5f0ad134
[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