diff mbox

[02/20] mt9m111: init chip after read CHIP_VERSION

Message ID 1280501618-23634-3-git-send-email-m.grzeschik@pengutronix.de (mailing list archive)
State Accepted
Headers show

Commit Message

Michael Grzeschik July 30, 2010, 2:53 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index e934559..39dff7c 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -969,10 +969,6 @@  static int mt9m111_video_probe(struct soc_camera_device *icd,
 	mt9m111->swap_rgb_even_odd = 1;
 	mt9m111->swap_rgb_red_blue = 1;
 
-	ret = mt9m111_init(client);
-	if (ret)
-		goto ei2c;
-
 	data = reg_read(CHIP_VERSION);
 
 	switch (data) {
@@ -994,6 +990,8 @@  static int mt9m111_video_probe(struct soc_camera_device *icd,
 		goto ei2c;
 	}
 
+	ret = mt9m111_init(client);
+
 ei2c:
 	return ret;
 }