lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9ea35f06-fd05-20e9-d29a-eb1ac56d7936@xs4all.nl>
Date:   Wed, 17 Mar 2021 11:57:18 +0100
From:   Hans Verkuil <hverkuil-cisco@...all.nl>
To:     Ricardo Ribalda <ribalda@...omium.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        tfiga@...omium.org
Subject: Re: [PATCH v5 07/13] media: uvcvideo: Use dev->name for querycap()

On 16/03/2021 18:59, Ricardo Ribalda wrote:
> Use the device name for the card name instead of cap->card.

You mean: 'instead of vdev->name.' ?

> 
> Suggested-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
>  drivers/media/usb/uvc/uvc_v4l2.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> index e956d833ed84..d780065f3716 100644
> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> @@ -617,13 +617,12 @@ static int uvc_v4l2_release(struct file *file)
>  static int uvc_ioctl_querycap(struct file *file, void *fh,
>  			      struct v4l2_capability *cap)
>  {
> -	struct video_device *vdev = video_devdata(file);
>  	struct uvc_fh *handle = file->private_data;
>  	struct uvc_video_chain *chain = handle->chain;
>  	struct uvc_streaming *stream = handle->stream;
>  
>  	strscpy(cap->driver, "uvcvideo", sizeof(cap->driver));
> -	strscpy(cap->card, vdev->name, sizeof(cap->card));
> +	strscpy(cap->card, handle->stream->dev->name, sizeof(cap->card));

I don't think this is right. I get this for the video node:

Card type        : Integrated IR Camera: Integrate

and this for the corresponding metadata node:

Card type        : Metadata 7

But they are the same device, so I expect the same text here.

Regards,

	Hans

>  	usb_make_path(stream->dev->udev, cap->bus_info, sizeof(cap->bus_info));
>  	cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING
>  			  | chain->caps;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ