media: vimc: use data link entities enum to index the ent_config array
authorDaniel Oakley <daniel.oakley@ideasonboard.com>
Thu, 16 Jun 2022 10:07:47 +0000 (11:07 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 15 Jul 2022 13:43:55 +0000 (14:43 +0100)
commitee8dadd7704810f4319d0b469c59e6812ef0115f
tree3fcfad3a39c2c6739c2bba441f2290e6799b682d
parentf2e761fdace257dd0411958efedb0e7af043c4f8
media: vimc: use data link entities enum to index the ent_config array

Future additions to the ent_config[] could break the association between
the index of the struct vimc_ent_config entries in the ent_config[] array,
and the index defined by the enum proposed in the previous patch. Using
designated initializers solves this by linking the 2 together clearly in
code and prevents the array not reflecting the enum. There is no
functional change intended.

Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Daniel Oakley <daniel.oakley@ideasonboard.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/test-drivers/vimc/vimc-core.c