All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Grzeschik <m.grzeschik@pengutronix.de>
To: linux-media@vger.kernel.org
Cc: robert.jarzmik@free.fr, g.liakhovetski@gmx.de,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	Philipp Wiesner <p.wiesner@phytec.de>
Subject: [PATCH 02/11] mt9m111: init chip after read CHIP_VERSION
Date: Tue,  3 Aug 2010 12:57:40 +0200	[thread overview]
Message-ID: <1280833069-26993-3-git-send-email-m.grzeschik@pengutronix.de> (raw)
In-Reply-To: <1280833069-26993-1-git-send-email-m.grzeschik@pengutronix.de>

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>
---
 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 68f3df6..e7618da 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) {
@@ -993,6 +989,8 @@ static int mt9m111_video_probe(struct soc_camera_device *icd,
 		goto ei2c;
 	}
 
+	ret = mt9m111_init(client);
+
 ei2c:
 	return ret;
 }
-- 
1.7.1


  parent reply	other threads:[~2010-08-03 10:57 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-03 10:57 [PATCH v2 00/11] MT9M111/MT9M131 Michael Grzeschik
2010-08-03 10:57 ` [PATCH v2 01/11] mt9m111: Added indication that MT9M131 is supported by this driver Michael Grzeschik
2010-08-03 10:57 ` Michael Grzeschik [this message]
2010-08-03 10:57 ` [PATCH 03/11] mt9m111: register cleanup hex to dec bitoffset Michael Grzeschik
2010-08-03 10:57 ` [PATCH 04/11] mt9m111: added new bit offset defines Michael Grzeschik
2010-08-27 15:11   ` Guennadi Liakhovetski
2010-08-27 15:35     ` Michael Grzeschik
2010-08-27 16:30       ` Guennadi Liakhovetski
2010-08-27 17:09         ` Michael Grzeschik
2010-08-03 10:57 ` [PATCH 05/11] mt9m111: changed MIN_DARK_COLS to MT9M131 spec count Michael Grzeschik
2010-08-03 10:57 ` [PATCH 06/11] mt9m111: cropcap and s_crop check if type is VIDEO_CAPTURE Michael Grzeschik
2010-08-03 10:57 ` [PATCH 07/11] mt9m111: added current colorspace at g_fmt Michael Grzeschik
2010-08-03 10:57 ` [PATCH 08/11] mt9m111: added reg_mask function Michael Grzeschik
2010-08-03 10:57 ` [PATCH 09/11] v4l2-mediabus: Add pixelcodes for BGR565 formats Michael Grzeschik
2010-08-03 10:57 ` [PATCH v2 10/11] mt9m111: rewrite set_pixfmt Michael Grzeschik
2010-08-27 11:42   ` Guennadi Liakhovetski
2010-08-29 19:17     ` Robert Jarzmik
2010-08-31  7:46       ` Michael Grzeschik
2010-09-04 20:35         ` Guennadi Liakhovetski
2010-10-02  8:03           ` Guennadi Liakhovetski
2010-10-25  9:42             ` Michael Grzeschik
2010-10-25 10:11   ` [PATCH v3] " Michael Grzeschik
2010-10-25 20:19     ` Guennadi Liakhovetski
2010-08-03 10:57 ` [PATCH v2 11/11] mt9m111: make use of testpattern Michael Grzeschik
2010-08-29 16:57   ` Robert Jarzmik
2010-08-29 18:35     ` Guennadi Liakhovetski
2010-09-05 16:44       ` Robert Jarzmik
2010-08-17 13:17 ` [PATCH v2 00/11] MT9M111/MT9M131 Michael Grzeschik
2010-08-17 13:21   ` Guennadi Liakhovetski
2010-08-29 19:20     ` Robert Jarzmik
2010-08-31  8:04       ` Michael Grzeschik
2010-08-18 18:05   ` Robert Jarzmik
2010-08-22 18:07     ` Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280833069-26993-3-git-send-email-m.grzeschik@pengutronix.de \
    --to=m.grzeschik@pengutronix.de \
    --cc=g.liakhovetski@gmx.de \
    --cc=linux-media@vger.kernel.org \
    --cc=p.wiesner@phytec.de \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.