media: i2c: imx290: Use V4L2 subdev active state
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 17 Oct 2022 10:44:27 +0000 (12:44 +0200)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 3 Feb 2023 14:03:36 +0000 (15:03 +0100)
commita2514b9a634ac0a2cfbc329822b8fb58ffe23a80
tree1f023acec3965af52c18f2af50b4b4c44f3c9bc2
parente5d363ca82b94b26d85043c26e865824f947a80b
media: i2c: imx290: Use V4L2 subdev active state

Use the V4L2 subdev active state API to store the active format. This
simplifies the driver not only by dropping the imx290 current_format
field, but it also allows dropping the imx290 lock, replaced with the
state lock.

The lock check in imx290_ctrl_update() can be dropped as
imx290_set_fmt() can't be called anywmore with which set to ACTIVE
before controls are initialized.

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