All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH 2/3] vivi: set device_caps.
Date: Fri, 25 Nov 2011 08:53:52 -0200	[thread overview]
Message-ID: <4ECF73C0.6090904@redhat.com> (raw)
In-Reply-To: <bd80eb41a795b4fac63dff9005b10835e4aa8b17.1321956058.git.hans.verkuil@cisco.com>

Em 22-11-2011 08:05, Hans Verkuil escreveu:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
>  drivers/media/video/vivi.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
> index 7d754fb..84ea88d 100644
> --- a/drivers/media/video/vivi.c
> +++ b/drivers/media/video/vivi.c
> @@ -819,8 +819,9 @@ static int vidioc_querycap(struct file *file, void  *priv,
>  	strcpy(cap->driver, "vivi");
>  	strcpy(cap->card, "vivi");
>  	strlcpy(cap->bus_info, dev->v4l2_dev.name, sizeof(cap->bus_info));
> -	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | \
> -			    V4L2_CAP_READWRITE;
> +	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
> +			    V4L2_CAP_READWRITE | V4L2_CAP_DEVICE_CAPS;
> +	cap->device_caps = cap->capabilities;

Hmm... should V4L2_CAP_DEVICE_CAPS be present at both device_caps and capabilities?

IMHO, the better would be to do:

	cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
			    V4L2_CAP_READWRITE | V4L2_CAP_DEVICE_CAPS;
	cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;

Btw, this ambiguity should also be solved at the V4L2 spec.

Regards,
Mauro

  reply	other threads:[~2011-11-25 10:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 10:05 [PATCH 0/3] Add per-device-node capabilities Hans Verkuil
2011-11-22 10:05 ` [PATCH 1/3] V4L2: " Hans Verkuil
2011-11-22 10:05   ` [PATCH 2/3] vivi: set device_caps Hans Verkuil
2011-11-25 10:53     ` Mauro Carvalho Chehab [this message]
2011-11-25 11:18       ` Hans Verkuil
2011-11-22 10:05   ` [PATCH 3/3] ivtv: setup per-device caps Hans Verkuil
2011-11-25 11:00     ` Mauro Carvalho Chehab
2011-11-25 11:29       ` Hans Verkuil
2011-11-25 11:55         ` Mauro Carvalho Chehab
2011-11-25 10:51   ` [PATCH 1/3] V4L2: Add per-device-node capabilities Mauro Carvalho Chehab
2011-11-25 11:14     ` 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=4ECF73C0.6090904@redhat.com \
    --to=mchehab@redhat.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /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.