public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org,
	Martin Hostettler <martin@neutronstar.dyndns.org>
Subject: Re: [PATCH v3 5/5] v4l: Add driver for Micron MT9M032 camera sensor
Date: Fri, 09 Mar 2012 13:26:15 +0100	[thread overview]
Message-ID: <2691948.ctHUsthuZj@avalon> (raw)
In-Reply-To: <20120308171745.GE1591@valkosipuli.localdomain>

Hi Sakari,

On Thursday 08 March 2012 19:17:46 Sakari Ailus wrote:
> On Wed, Mar 07, 2012 at 12:31:34PM +0100, Laurent Pinchart wrote:

[snip]

> > > > +static int mt9m032_set_frame_interval(struct v4l2_subdev *subdev,
> > > > +				      struct v4l2_subdev_frame_interval *fi)
> > > > +{
> > > > +	struct mt9m032 *sensor = to_mt9m032(subdev);
> > > > +	int ret;
> > > > +
> > > > +	if (sensor->streaming)
> > > > +		return -EBUSY;
> > > > +
> > > > +	memset(fi->reserved, 0, sizeof(fi->reserved));
> > > 
> > > I'm not quite sure these should be touched.
> > 
> > Why not ? Do you think this could cause a regression in the future when
> > the fields won't be reserved anymore ?
> 
> The user is responsible for setting those fields to zero. If we set them to
> zero for them they will start relying on that. At some point that might not
> hold true anymore.

Thinking about it some more, applications should set the reserved fields to 0, 
or first issue a get call and modify the fields it's interested in, keeping 
the reserved fields at their default value. I'll remove the memset here.

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2012-03-09 12:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 16:32 [PATCH v3 0/5] MT9M032 and MT9P031 sensor patches Laurent Pinchart
2012-03-06 16:32 ` [PATCH v3 1/5] mt9p031: Remove duplicate media/v4l2-subdev.h include Laurent Pinchart
2012-03-06 16:32 ` [PATCH v3 2/5] mt9p031: Remove unused xskip and yskip fields in struct mt9p031 Laurent Pinchart
2012-03-06 20:37   ` Sakari Ailus
2012-03-06 16:32 ` [PATCH v3 3/5] v4l: Aptina-style sensor PLL support Laurent Pinchart
2012-03-06 16:32 ` [PATCH v3 4/5] mt9p031: Use generic PLL setup code Laurent Pinchart
2012-03-06 20:39   ` Sakari Ailus
2012-03-06 16:32 ` [PATCH v3 5/5] v4l: Add driver for Micron MT9M032 camera sensor Laurent Pinchart
2012-03-06 23:16   ` Sakari Ailus
2012-03-07 11:31     ` Laurent Pinchart
2012-03-08 17:17       ` Sakari Ailus
2012-03-09 12:26         ` Laurent Pinchart [this message]

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=2691948.ctHUsthuZj@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=martin@neutronstar.dyndns.org \
    --cc=sakari.ailus@iki.fi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox