diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2010-08-03 06:57:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:03 -0400 |
commit | 175bad921c75ab3b7d11a9fffc0e8d9a4a179e61 (patch) | |
tree | 054a9d23be1caa9501702d044d6498ec8abed253 /drivers/media/video | |
parent | c8cf078ebd9f9b5ec3a113c8262062799fd9948a (diff) |
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: Philipp Wiesner <p.wiesner@phytec.de>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/mt9m111.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c index 9f92d6353231..758a4db27d65 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, | |||
969 | mt9m111->swap_rgb_even_odd = 1; | 969 | mt9m111->swap_rgb_even_odd = 1; |
970 | mt9m111->swap_rgb_red_blue = 1; | 970 | mt9m111->swap_rgb_red_blue = 1; |
971 | 971 | ||
972 | ret = mt9m111_init(client); | ||
973 | if (ret) | ||
974 | goto ei2c; | ||
975 | |||
976 | data = reg_read(CHIP_VERSION); | 972 | data = reg_read(CHIP_VERSION); |
977 | 973 | ||
978 | switch (data) { | 974 | switch (data) { |
@@ -993,6 +989,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd, | |||
993 | goto ei2c; | 989 | goto ei2c; |
994 | } | 990 | } |
995 | 991 | ||
992 | ret = mt9m111_init(client); | ||
993 | |||
996 | ei2c: | 994 | ei2c: |
997 | return ret; | 995 | return ret; |
998 | } | 996 | } |