diff options
author | NĂcolas F. R. A. Prado <nfraprado@protonmail.com> | 2020-05-01 15:11:02 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-05-05 17:25:14 +0200 |
commit | b77da87c84f8d3f0290ef96f72edac9a9d2b1d23 (patch) | |
tree | d67311996ff40192d2f4d0de0f005cf9a8540368 /drivers/media/test-drivers/vimc/vimc-sensor.c | |
parent | 6c8d0cdd6ccb21badd52a10d627f80cf1a6ab63f (diff) |
media: vimc: Support multiple media bus codes for each pixelformat
Change vimc_pix_map_list to allow multiple media bus codes to map to the
same pixelformat, making it possible to add media bus codes for which
there are no pixelformat.
Acked-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@protonmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil-cisco@xs4all.nl: fix sparse warning: const u32 -> u32]
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/test-drivers/vimc/vimc-sensor.c')
-rw-r--r-- | drivers/media/test-drivers/vimc/vimc-sensor.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/test-drivers/vimc/vimc-sensor.c b/drivers/media/test-drivers/vimc/vimc-sensor.c index 56e8ec14be46..a2f09ac9a360 100644 --- a/drivers/media/test-drivers/vimc/vimc-sensor.c +++ b/drivers/media/test-drivers/vimc/vimc-sensor.c @@ -52,12 +52,12 @@ static int vimc_sen_enum_mbus_code(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config *cfg, struct v4l2_subdev_mbus_code_enum *code) { - const struct vimc_pix_map *vpix = vimc_pix_map_by_index(code->index); + u32 mbus_code = vimc_mbus_code_by_index(code->index); - if (!vpix) + if (!mbus_code) return -EINVAL; - code->code = vpix->code; + code->code = mbus_code; return 0; } |