From 411d6f671b216f7127284349d9c30a6cca88a15d Mon Sep 17 00:00:00 2001 From: "guoyin.chen" Date: Thu, 24 May 2012 17:48:14 +0800 Subject: ENGR00210728 testMultiCameraRelease failed in CameraTest 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 --- drivers/media/video/mxc/capture/mxc_v4l2_capture.c | 9 +++++---- 1 file 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); -- cgit v1.2.3