diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-06-19 13:52:12 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-09-27 10:40:02 +0300 |
commit | 10c6c42859cc381e9176594544b15e7260737e56 (patch) | |
tree | 62223371eef877031185b24a04a4647b1527b4ee | |
parent | b6da9e5a061751f92be7f18208a4aab9e52f24da (diff) | |
download | linux-10c6c42859cc381e9176594544b15e7260737e56.tar.xz |
media: atomisp: Remove v4l2_ctrl_s_ctrl(asd->run_mode) calls from atomisp_open()
The v4l2_ctrl_s_ctrl(asd->run_mode) call in atomisp_subdev_init_struct()
gets immediately overridden by a second call directly after
atomisp_subdev_init_struct() is called.
And the second call in atomisp_open() also is not helpful.
ATOMISP_RUN_MODE_PREVIEW is the default and if changed controls
are supposed to stay changed over an open/close of the /dev/video#
node. So drop both calls.
Link: https://lore.kernel.org/r/20230619105212.303653-7-hdegoede@redhat.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_fops.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c index a09087dccbcb..4dba6120af39 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_fops.c +++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c @@ -460,7 +460,6 @@ static void atomisp_dev_init_struct(struct atomisp_device *isp) static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd) { - v4l2_ctrl_s_ctrl(asd->run_mode, ATOMISP_RUN_MODE_STILL_CAPTURE); memset(&asd->params.css_param, 0, sizeof(asd->params.css_param)); asd->params.color_effect = V4L2_COLORFX_NONE; asd->params.bad_pixel_en = true; @@ -533,8 +532,6 @@ static int atomisp_open(struct file *file) } atomisp_subdev_init_struct(asd); - /* Ensure that a mode is set */ - v4l2_ctrl_s_ctrl(asd->run_mode, ATOMISP_RUN_MODE_PREVIEW); pipe->users++; mutex_unlock(&isp->mutex); |