diff options
| author | NĂcolas F. R. A. Prado <[email protected]> | 2020-05-01 13:11:02 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2020-05-05 15:25:14 +0000 |
| commit | b77da87c84f8d3f0290ef96f72edac9a9d2b1d23 (patch) | |
| tree | d67311996ff40192d2f4d0de0f005cf9a8540368 /drivers/media/test-drivers/vimc/vimc-sensor.c | |
| parent | media: ti-vpe: avoid gcc-9 warning (diff) | |
| download | kernel-b77da87c84f8d3f0290ef96f72edac9a9d2b1d23.tar.gz kernel-b77da87c84f8d3f0290ef96f72edac9a9d2b1d23.zip | |
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 <[email protected]>
Signed-off-by: NĂcolas F. R. A. Prado <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[[email protected]: fix sparse warning: const u32 -> u32]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
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; } |
