aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/m5mols/m5mols_capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/m5mols/m5mols_capture.c')
-rw-r--r--drivers/media/video/m5mols/m5mols_capture.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/video/m5mols/m5mols_capture.c b/drivers/media/video/m5mols/m5mols_capture.c
index ba25e8e2ba4c..cb243bd278ce 100644
--- a/drivers/media/video/m5mols/m5mols_capture.c
+++ b/drivers/media/video/m5mols/m5mols_capture.c
@@ -106,7 +106,6 @@ static int m5mols_capture_info(struct m5mols_info *info)
106int m5mols_start_capture(struct m5mols_info *info) 106int m5mols_start_capture(struct m5mols_info *info)
107{ 107{
108 struct v4l2_subdev *sd = &info->sd; 108 struct v4l2_subdev *sd = &info->sd;
109 u8 resolution = info->resolution;
110 int ret; 109 int ret;
111 110
112 /* 111 /*
@@ -114,22 +113,18 @@ int m5mols_start_capture(struct m5mols_info *info)
114 * format. The frame capture is initiated during switching from Monitor 113 * format. The frame capture is initiated during switching from Monitor
115 * to Capture mode. 114 * to Capture mode.
116 */ 115 */
117 ret = m5mols_mode(info, REG_MONITOR); 116 ret = m5mols_set_mode(info, REG_MONITOR);
118 if (!ret) 117 if (!ret)
119 ret = m5mols_restore_controls(info); 118 ret = m5mols_restore_controls(info);
120 if (!ret) 119 if (!ret)
121 ret = m5mols_write(sd, CAPP_YUVOUT_MAIN, REG_JPEG); 120 ret = m5mols_write(sd, CAPP_YUVOUT_MAIN, REG_JPEG);
122 if (!ret) 121 if (!ret)
123 ret = m5mols_write(sd, CAPP_MAIN_IMAGE_SIZE, resolution); 122 ret = m5mols_write(sd, CAPP_MAIN_IMAGE_SIZE, info->resolution);
124 if (!ret) 123 if (!ret)
125 ret = m5mols_lock_3a(info, true); 124 ret = m5mols_set_mode(info, REG_CAPTURE);
126 if (!ret)
127 ret = m5mols_mode(info, REG_CAPTURE);
128 if (!ret) 125 if (!ret)
129 /* Wait until a frame is captured to ISP internal memory */ 126 /* Wait until a frame is captured to ISP internal memory */
130 ret = m5mols_wait_interrupt(sd, REG_INT_CAPTURE, 2000); 127 ret = m5mols_wait_interrupt(sd, REG_INT_CAPTURE, 2000);
131 if (!ret)
132 ret = m5mols_lock_3a(info, false);
133 if (ret) 128 if (ret)
134 return ret; 129 return ret;
135 130