media: ov2680: Pass correct number of controls to v4l2_ctrl_handler_init()
authorHans de Goede <hdegoede@redhat.com>
Sat, 8 Jun 2024 14:38:15 +0000 (16:38 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 15 Jun 2024 09:16:40 +0000 (11:16 +0200)
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>
drivers/media/i2c/ov2680.c

index 3ae0ea58668d9fbeeb32b33d8b7452487a9a80e3..7237fb27ecd00ef782bcd39ed522d5167eb4f23c 100644 (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;