media: ov7740: remove redundant V4L2_CTRL_FLAG_VOLATILE set
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 17 Apr 2019 14:06:41 +0000 (10:06 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 23 May 2019 09:41:38 +0000 (05:41 -0400)
If the v4l2 controls are set up for autofoo/foo-type handling by calling
v4l2_ctrl_auto_cluster() with the last set_volatile argument setting true,
each non-auto control doesn't need to be flagged V4L2_CTRL_FLAG_VOLATILE.

Cc: Wenyou Yang <wenyou.yang@microchip.com>
Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/i2c/ov7740.c

index 352658b..70bb870 100644 (file)
@@ -1012,8 +1012,6 @@ static int ov7740_init_controls(struct ov7740 *ov7740)
 
        ov7740->gain = v4l2_ctrl_new_std(ctrl_hdlr, &ov7740_ctrl_ops,
                                       V4L2_CID_GAIN, 0, 1023, 1, 500);
-       if (ov7740->gain)
-               ov7740->gain->flags |= V4L2_CTRL_FLAG_VOLATILE;
 
        ov7740->auto_gain = v4l2_ctrl_new_std(ctrl_hdlr, &ov7740_ctrl_ops,
                                            V4L2_CID_AUTOGAIN, 0, 1, 1, 1);