media: i2c: imx219: Simplify format assignment
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>
Mon, 10 Jul 2023 15:52:02 +0000 (17:52 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:39 +0000 (07:58 +0200)
commit7319d5706493d66587e0ae602608465b1ad9963e
tree61610052813e884ba4c74c6e756094c0aa444df3
parente8a5b1df000e1a23c04dadbe99621441e0889f88
media: i2c: imx219: Simplify format assignment

The set_fmt and init_cfg functions both fills a v4l2_mbus_framefmt
instance, passing in the mode and the media bus code. While set_fmt
uses function helpers, init_cfg open-codes the assignments.

Simplify the format initialization by moving it to a common helper.

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