media: ar0521: Setup controls at s_stream time
authorJacopo Mondi <jacopo@jmondi.org>
Fri, 4 Nov 2022 14:24:51 +0000 (14:24 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 25 Nov 2022 08:45:37 +0000 (08:45 +0000)
Setup all the registered controls at s_stream(1) time instead of
manually configure gains.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/i2c/ar0521.c

index 0ef4acac1bd38e9fd06931b46d2d5d712852d93c..323f583e2029cd222b186d79294263dc2776be8a 100644 (file)
@@ -399,7 +399,7 @@ static int ar0521_set_stream(struct ar0521_dev *sensor, bool on)
                if (ret)
                        goto err;
 
-               ret = ar0521_set_gains(sensor);
+               ret =  __v4l2_ctrl_handler_setup(&sensor->ctrls.handler);
                if (ret)
                        goto err;