media: i2c: imx219: Simplify code handling in s_fmt
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>
Mon, 10 Jul 2023 15:52:03 +0000 (17:52 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:39 +0000 (07:58 +0200)
commit34e3d3c9ddbd7cc7606c726cd0d6fe7313b231c1
tree92d680f588e6c78bc870a79ab8faa270a95981d3
parent7319d5706493d66587e0ae602608465b1ad9963e
media: i2c: imx219: Simplify code handling in s_fmt

The imx219_set_pad_format() function adjusts the media bus code provided
through the v4l2_subdev_format parameter to a media bus code known
to be supported by the sensor.

The same exact operation is performed by the imx219_get_format_code()
function which called by imx219_update_pad_format(), which is in the
imx219_set_pad_format() call path.

Remove the duplicated operation and simplify imx219_set_pad_format().

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/imx219.c