1

media: ov2680: Pass correct number of controls to v4l2_ctrl_handler_init()

The ov2680 driver has 9 controls now and the call to
v4l2_ctrl_new_fwnode_properties() adds 2 more.

Tell v4l2_ctrl_handler_init() to pre-allocate space for 11
controls to match this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
This commit is contained in:
Hans de Goede 2024-06-08 16:38:15 +02:00 committed by Hans Verkuil
parent 440de616e7
commit e0b66a6e47

View File

@ -971,7 +971,7 @@ static int ov2680_v4l2_register(struct ov2680_dev *sensor)
if (ret < 0)
return ret;
v4l2_ctrl_handler_init(hdl, 5);
v4l2_ctrl_handler_init(hdl, 11);
hdl->lock = &sensor->lock;