devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benoit Parrot <bparrot@ti.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	Jacopo Mondi <jacopo@jmondi.org>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Patch v3 1/3] media: ov5640: add PIXEL_RATE control
Date: Mon, 7 Oct 2019 10:17:03 -0500	[thread overview]
Message-ID: <20191007151703.z3eejxuujzt5ruth@ti.com> (raw)
In-Reply-To: <20191007080320.GG14917@paasikivi.fi.intel.com>

Sakari Ailus <sakari.ailus@linux.intel.com> wrote on Mon [2019-Oct-07 11:03:20 +0300]:
> On Fri, Oct 04, 2019 at 12:24:16PM -0500, Benoit Parrot wrote:
> > @@ -2657,6 +2669,12 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
> >  	/* we can use our own mutex for the ctrl lock */
> >  	hdl->lock = &sensor->lock;
> >  
> > +	/* Clock related controls */
> > +	ctrls->pixel_rate = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_PIXEL_RATE,
> > +					      0, INT_MAX, 1,
> > +					      ov5640_calc_pixel_rate(sensor));
> > +	ctrls->pixel_rate->flags |= V4L2_CTRL_FLAG_READ_ONLY;
> 
> Please check ctrls->pixel_rate first; it may be NULL here.

How about I just move this line below "if (hdl->error)" instead?

Benoit
> 
> > +
> >  	/* Auto/manual white balance */
> >  	ctrls->auto_wb = v4l2_ctrl_new_std(hdl, ops,
> >  					   V4L2_CID_AUTO_WHITE_BALANCE,
> 
> -- 
> Sakari Ailus
> sakari.ailus@linux.intel.com

  reply	other threads:[~2019-10-07 15:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 17:24 [Patch v3 0/3] media: ov5640: updates Benoit Parrot
2019-10-04 17:24 ` [Patch v3 1/3] media: ov5640: add PIXEL_RATE control Benoit Parrot
2019-10-07  8:03   ` Sakari Ailus
2019-10-07 15:17     ` Benoit Parrot [this message]
2019-10-08  6:58       ` Sakari Ailus
2019-10-04 17:24 ` [Patch v3 2/3] media: ov5640: Fix 1920x1080 mode to remove extra enable/disable Benoit Parrot
2019-10-04 17:24 ` [Patch v3 3/3] media: ov5640: Make 2592x1944 mode only available at 15 fps Benoit Parrot

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=20191007151703.z3eejxuujzt5ruth@ti.com \
    --to=bparrot@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).