Commit 175bad92 authored by Michael Grzeschik's avatar Michael Grzeschik Committed by Mauro Carvalho Chehab

V4L/DVB: mt9m111: init chip after read CHIP_VERSION

Moved mt9m111_init after the chip version detection passage: I
don't like the idea of writing on a device we haven't identified
yet.
Signed-off-by: default avatarPhilipp Wiesner <p.wiesner@phytec.de>
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c8cf078e
...@@ -969,10 +969,6 @@ static int mt9m111_video_probe(struct soc_camera_device *icd, ...@@ -969,10 +969,6 @@ static int mt9m111_video_probe(struct soc_camera_device *icd,
mt9m111->swap_rgb_even_odd = 1; mt9m111->swap_rgb_even_odd = 1;
mt9m111->swap_rgb_red_blue = 1; mt9m111->swap_rgb_red_blue = 1;
ret = mt9m111_init(client);
if (ret)
goto ei2c;
data = reg_read(CHIP_VERSION); data = reg_read(CHIP_VERSION);
switch (data) { switch (data) {
...@@ -993,6 +989,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd, ...@@ -993,6 +989,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd,
goto ei2c; goto ei2c;
} }
ret = mt9m111_init(client);
ei2c: ei2c:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment