From: Jonathan Corbet Date: Thu, 18 Mar 2010 22:10:18 +0000 (-0300) Subject: V4L/DVB: ov7670: Always rewrite clkrc when setting format X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a8e68c37c846236499ac05e95af76dff2e9aa1eb;p=openwrt%2Fstaging%2Fblogic.git V4L/DVB: ov7670: Always rewrite clkrc when setting format That makes frame rate configuration persistent. Signed-off-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/ov7670.c b/drivers/media/video/ov7670.c index 21243303755f..82d37d925eb4 100644 --- a/drivers/media/video/ov7670.c +++ b/drivers/media/video/ov7670.c @@ -838,8 +838,12 @@ static int ov7670_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *fmt) * the other parameters or the image looks poor. If we're *not* * doing RGB565, we must not rewrite clkrc or the image looks * *really* poor. + * + * (Update) Now that we retain clkrc state, we should be able + * to write it unconditionally, and that will make the frame + * rate persistent too. */ - if (fmt->fmt.pix.pixelformat == V4L2_PIX_FMT_RGB565 && ret == 0) + if (ret == 0) ret = ov7670_write(sd, REG_CLKRC, info->clkrc); return ret; }