media: i2c: imx219: Access height from active format in imx219_set_ctrl
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 24 Sep 2023 15:33:00 +0000 (18:33 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 7 Oct 2023 08:55:47 +0000 (10:55 +0200)
commitaa86ac42eec4dd7e987c12390a0a487187e2d9ae
treefafb9ed25309532223033ebbd7eeb4b026ccdf2f
parentc59d77be1b8349757660216e20db8cac75e6c967
media: i2c: imx219: Access height from active format in imx219_set_ctrl

Use the active format height instead of the mode height in
imx219_set_ctrl(). This prepares for dropping the mode field from the
imx219 structure.

The state is retrieved using v4l2_subdev_get_locked_active_state() as
the subdev active state and the control handler share the same lock.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/imx219.c