summaryrefslogtreecommitdiff
path: root/drivers/staging/media/atomisp/pci/atomisp_fops.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2022-12-29 01:11:47 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-02-08 09:55:56 +0300
commit60ec70a71a9f9975a5d2dd4a7d97c20da0e41976 (patch)
treefe732f691c1eea0489dea85da8b3b35ea954f4d0 /drivers/staging/media/atomisp/pci/atomisp_fops.c
parent3376f06932f85eda824597f6ef93fccbbb92b64f (diff)
downloadlinux-60ec70a71a9f9975a5d2dd4a7d97c20da0e41976.tar.xz
media: atomisp: Only set default_run_mode on first open of a stream/asd
Calling v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode) when the stream is already active (through another /dev/video# node) causes the stream to stop. Move the call to set the default run-mode so that it is only done on the first open of one of the 4 /dev/video# nodes of one of the 2 streams (atomisp-sub-devices / asd-s). Fixes: 2c45e343c581 ("media: atomisp: set per-device's default mode") Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_fops.c')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_fops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_fops.c b/drivers/staging/media/atomisp/pci/atomisp_fops.c
index d953240cc908..ccdd780234a7 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_fops.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_fops.c
@@ -821,13 +821,13 @@ init_subdev:
goto done;
atomisp_subdev_init_struct(asd);
+ /* Ensure that a mode is set */
+ v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode);
done:
pipe->users++;
mutex_unlock(&isp->mutex);
- /* Ensure that a mode is set */
- v4l2_ctrl_s_ctrl(asd->run_mode, pipe->default_run_mode);
return 0;