Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 27351b13 authored by Jonathan Nieder's avatar Jonathan Nieder Committed by Mauro Carvalho Chehab
Browse files

[media] dw2102: use symbolic names for dw2102_table indices



dw2102_properties et al refer to entries in the USB-id table using
hard-coded indices, as in "&dw2102_table[6]", which means adding new
entries before the end of the list has the potential to introduce bugs
in code elsewhere in the file.

Use C99-style initializers with symbolic names for each index to avoid
this.  This way, other device tables wanting to reuse the USB ids can
use expressions like "&dw2102_table[TEVII_S630]" that do not change as
the entries in the table are reordered.

Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent eabd0eaf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment