media: i2c: imx290: Pass format and mode to imx290_calc_pixel_rate()
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 16 Jan 2023 14:44:42 +0000 (15:44 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 3 Feb 2023 14:00:28 +0000 (15:00 +0100)
commit31b54a422b3f66f715a0963d1d3ce0c7678fb333
treedd850b6f6c2843e89b4d8609aa769324fc363b89
parent70bbf56aa82ca972be424ec110f9a7f4ab9ee732
media: i2c: imx290: Pass format and mode to imx290_calc_pixel_rate()

Avoid accessing the imx290 current_format and current_mode fields in
imx290_calc_pixel_rate() to prepare for the removal of those fields.
Among the two callers of the function, imx290_ctrl_update() has an
explicit mode pointer already, and we can also give it a format pointer.
Use those explicitly.

While at it, inline the imx290_get_link_freq() function in
imx290_calc_pixel_rate() as it is only called there.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/imx290.c