diff mbox

[3/3] soc-camera: mt9t112: The flag which control camera-init is removed

Message ID umxzsky40.wl%morimoto.kuninori@renesas.com (mailing list archive)
State Rejected
Headers show

Commit Message

Kuninori Morimoto Feb. 2, 2010, 5:04 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c
index e581d8a..bd5ef62 100644
--- a/drivers/media/video/mt9t112.c
+++ b/drivers/media/video/mt9t112.c
@@ -106,9 +106,6 @@  struct mt9t112_priv {
 	struct mt9t112_frame_size	 frame;
 	const struct mt9t112_format	*format;
 	int				 model;
-	u32				 flags;
-/* for flags */
-#define INIT_DONE  (1<<0)
 };
 
 /************************************************************************
@@ -876,19 +873,14 @@  static int mt9t112_s_stream(struct v4l2_subdev *sd, int enable)
 		return ret;
 	}
 
-	if (!(priv->flags & INIT_DONE)) {
-		u16 param = (MT9T112_FLAG_PCLK_RISING_EDGE &
-			     priv->info->flags) ? 0x0001 : 0x0000;
+	ECHECKER(ret, mt9t112_init_camera(client));
 
-		ECHECKER(ret, mt9t112_init_camera(client));
+	/* Invert PCLK (Data sampled on falling edge of pixclk) */
+	mt9t112_reg_write(ret, client, 0x3C20,
+			  (MT9T112_FLAG_PCLK_RISING_EDGE & priv->info->flags) ?
+			  0x0001 : 0x0000);
 
-		/* Invert PCLK (Data sampled on falling edge of pixclk) */
-		mt9t112_reg_write(ret, client, 0x3C20, param);
-
-		mdelay(100);
-
-		priv->flags |= INIT_DONE;
-	}
+	mdelay(100);
 
 	mt9t112_mcu_write(ret, client, VAR(26, 7), priv->format->fmt);
 	mt9t112_mcu_write(ret, client, VAR(26, 9), priv->format->order);