All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Songjun Wu <songjun.wu@microchip.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: [RFC PATCH 3/7] ov7670: fix g/s_parm
Date: Wed, 17 Aug 2016 08:29:39 +0200	[thread overview]
Message-ID: <1471415383-38531-4-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1471415383-38531-1-git-send-email-hverkuil@xs4all.nl>

From: Hans Verkuil <hans.verkuil@cisco.com>

Drop unnecesary memset. Drop the unnecessary extendedmode check and
set the V4L2_CAP_TIMEPERFRAME capability.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/i2c/ov7670.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c
index 26ad1a2..fe527b2 100644
--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -1047,7 +1047,6 @@ static int ov7670_g_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
 	if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
 		return -EINVAL;
 
-	memset(cp, 0, sizeof(struct v4l2_captureparm));
 	cp->capability = V4L2_CAP_TIMEPERFRAME;
 	info->devtype->get_framerate(sd, &cp->timeperframe);
 
@@ -1062,9 +1061,8 @@ static int ov7670_s_parm(struct v4l2_subdev *sd, struct v4l2_streamparm *parms)
 
 	if (parms->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
 		return -EINVAL;
-	if (cp->extendedmode != 0)
-		return -EINVAL;
 
+	cp->capability = V4L2_CAP_TIMEPERFRAME;
 	return info->devtype->set_framerate(sd, tpf);
 }
 
-- 
2.8.1


  parent reply	other threads:[~2016-08-17  6:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17  6:29 [RFC PATCH 0/7] atmel-isi: convert to a standalone driver Hans Verkuil
2016-08-17  6:29 ` [RFC PATCH 1/7] ov7670: add media controller support Hans Verkuil
2016-08-17 12:25   ` Laurent Pinchart
2016-08-17  6:29 ` [RFC PATCH 2/7] ov7670: call v4l2_async_register_subdev Hans Verkuil
2016-08-17 12:27   ` Laurent Pinchart
2016-08-17  6:29 ` Hans Verkuil [this message]
2016-08-17  6:29 ` [RFC PATCH 4/7] ov7670: get xvclk Hans Verkuil
2016-08-17 12:30   ` Laurent Pinchart
2016-09-21 11:18   ` Sakari Ailus
2016-08-17  6:29 ` [RFC PATCH 5/7] ov7670: add devicetree support Hans Verkuil
2016-08-17 12:44   ` Laurent Pinchart
2016-08-26  7:45     ` Hans Verkuil
2016-09-21 13:30       ` Laurent Pinchart
2016-09-21 11:33     ` Sakari Ailus
2016-09-21 12:39       ` Laurent Pinchart
2016-09-21 11:09   ` Sakari Ailus
2016-08-17  6:29 ` [RFC PATCH 6/7] atmel-isi: remove dependency of the soc-camera framework Hans Verkuil
2016-08-18  5:53   ` Wu, Songjun
2016-09-21  7:04     ` Hans Verkuil
2016-09-23  6:05       ` Wu, Songjun
2016-10-18  9:21         ` Wu, Songjun
2016-10-18 10:58           ` Hans Verkuil
2016-10-19  7:36             ` Wu, Songjun
2016-10-19  7:46               ` Hans Verkuil
2016-10-19  7:48                 ` Wu, Songjun
2016-11-14  8:19                   ` Hans Verkuil
2016-11-14  8:22                     ` Wu, Songjun
2016-08-17  6:29 ` [RFC PATCH 7/7] sama5d3 dts: enable atmel-isi Hans Verkuil

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=1471415383-38531-4-git-send-email-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=songjun.wu@microchip.com \
    /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.