summaryrefslogtreecommitdiff
path: root/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
diff options
context:
space:
mode:
authorguoyin.chen <guoyin.chen@freescale.com>2012-05-24 17:48:14 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2012-05-24 17:48:14 +0800
commit411d6f671b216f7127284349d9c30a6cca88a15d (patch)
treed56587ddb6ae615f4e9023dfba49b45088c4e133 /drivers/media/video/mxc/capture/mxc_v4l2_capture.c
parent597f463197ef32b8f033776f1c599090e9f2b9aa (diff)
ENGR00210728 testMultiCameraRelease failed in CameraTestimx-android-r13.3
Two camera instance will be opened at the same time, and only one will be kept stream on. The previous camera's close will stream off the second camera's dequeue function. Signed-off-by: guoyin.chen <guoyin.chen@freescale.com>
Diffstat (limited to 'drivers/media/video/mxc/capture/mxc_v4l2_capture.c')
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index 28ca0c557271..7713b3d80846 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1724,12 +1724,13 @@ static int mxc_v4l_close(struct file *file)
err = stop_preview(cam);
cam->overlay_on = false;
}
- if (cam->capture_pid == current->pid) {
- err |= mxc_streamoff(cam);
- wake_up_interruptible(&cam->enc_queue);
- }
if (--cam->open_count == 0) {
+ if (cam->capture_pid == current->pid) {
+ err |= mxc_streamoff(cam);
+ wake_up_interruptible(&cam->enc_queue);
+ }
+
vidioc_int_s_power(cam->sensor, 0);
ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_I2C, cam->csi,
false, false);