From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Sylwester Nawrocki <snjw23@gmail.com>
Cc: Ezequiel Garcia <elezegarcia@gmail.com>,
linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH v4] media: Add stk1160 new driver
Date: Thu, 05 Jul 2012 21:01:28 -0300 [thread overview]
Message-ID: <4FF62AD8.2080907@redhat.com> (raw)
In-Reply-To: <4FF616E5.6040206@gmail.com>
Em 05-07-2012 19:36, Sylwester Nawrocki escreveu:
> On 07/06/2012 12:11 AM, Mauro Carvalho Chehab wrote:
>>> +static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *p)
>>> +{
>>> + struct stk1160 *dev = video_drvdata(file);
>>> +
>>> + if (!stk1160_is_owner(dev, file))
>>> + return -EBUSY;
>>> +
>>> + return vb2_dqbuf(&dev->vb_vidq, p, file->f_flags& O_NONBLOCK);
>>
>> Why to use O_NONBLOCK here? it should be doing whatever userspace wants.
>
> This is OK, since the third argument to vb2_dqbuf() is a boolean indicating
> whether this call should be blocking or not. And a "& O_NONBLOCK" masks this
> information out from file->f_flags.
Ah! OK then.
It might be better to initialize it during vb2 initialization, at open,
instead of requiring this argument every time vb_dqbuf() is called.
Btw, just noticed a minor issue: an space is required before the "&" operator.
Regards,
Mauro
next prev parent reply other threads:[~2012-07-06 0:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-29 17:34 [PATCH v4] media: Add stk1160 new driver Ezequiel Garcia
2012-07-05 22:11 ` Mauro Carvalho Chehab
2012-07-05 22:36 ` Sylwester Nawrocki
2012-07-06 0:01 ` Mauro Carvalho Chehab [this message]
2012-07-06 14:41 ` Ezequiel Garcia
2012-07-10 3:17 ` Ezequiel Garcia
2012-07-10 6:39 ` Hans Verkuil
2012-07-10 12:26 ` Ezequiel Garcia
2012-07-10 12:34 ` Hans Verkuil
2012-07-12 23:59 ` Ezequiel Garcia
2012-07-06 15:01 ` Ezequiel Garcia
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=4FF62AD8.2080907@redhat.com \
--to=mchehab@redhat.com \
--cc=elezegarcia@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=snjw23@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 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.