Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>, LMML <linux-media@vger.kernel.org>
Subject: Re: about v4l2_fh_is_singular
Date: Tue, 20 Dec 2011 12:29:34 +0200	[thread overview]
Message-ID: <20111220102933.GP3677@valkosipuli.localdomain> (raw)
In-Reply-To: <CAHG8p1BZtAoYWu_-3sW1dtqwmATQbNSwcxZnEqYXsD8hdhcXUg@mail.gmail.com>

On Tue, Dec 20, 2011 at 05:29:47PM +0800, Scott Jiang wrote:
> Hi Sakari,
> 
> Hans recommends me using v4l2_fh_is_singular in first open, but I
> found it used list_is_singular(&fh->list).
> Should it use &fh->vdev->fh_list or I missed something?

Hi, Scott!

I think why Hans is telling you that you should use v4l2_fh_is_singular()
instead of going for list_is_singular() directly, is that how the file
handles are being stored by the V4L2 subdev framework might be changed in
the future. If you use v4l2_fh_is_singular(), you won't need to change your
driver if that happens. Besides that, it's often better not deal with things
you don't really need to.

Regards,

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi	jabber/XMPP/Gmail: sailus@retiisi.org.uk

      reply	other threads:[~2011-12-20 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20  9:29 about v4l2_fh_is_singular Scott Jiang
2011-12-20 10:29 ` Sakari Ailus [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=20111220102933.GP3677@valkosipuli.localdomain \
    --to=sakari.ailus@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=scott.jiang.linux@gmail.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