media: i2c: imx477: Remove internal v4l2_mbus_framefmt from the state
authorNaushir Patuck <naush@raspberrypi.com>
Fri, 19 Feb 2021 10:30:49 +0000 (10:30 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:11 +0000 (16:04 +0000)
commit62cbafade77feb715f7b36590f8e67876e4a6c6a
tree032ac175136f646bf6653f63f9c0f698cfdb8974
parentf616e72b3a18e33333fdce6f1e9558b4e5f55071
media: i2c: imx477: Remove internal v4l2_mbus_framefmt from the state

The only field in this struct that is used is the format code, so
replace the struct with this single field.

Save the format code in imx477_set_pad_format() when setting up a new
mode so that imx477_get_pad_format() performs the right lookup.
Otherwise, this caused a bug where the mode lookup occurred on the
12-bit table rather than the 10-bit table.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
drivers/media/i2c/imx477.c