All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH 1/3] uvcvideo: initialise the entity function field
Date: Fri, 24 Jun 2016 16:26:29 +0300	[thread overview]
Message-ID: <2830501.QdemJ557Im@avalon> (raw)
In-Reply-To: <Pine.LNX.4.64.1606241326030.23461@axis700.grange>

Hi Guennadi,

Thank you for the patch.

On Friday 24 Jun 2016 13:28:55 Guennadi Liakhovetski wrote:
> Since a recent commit:
> 
> [media] media-device: move media entity register/unregister functions
> 
> drivers have to set entity function before registering an entity. Fix
> the uvcvideo driver to comply with this.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> ---
>  drivers/media/usb/uvc/uvc_entity.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/media/usb/uvc/uvc_entity.c
> b/drivers/media/usb/uvc/uvc_entity.c index ac386bb..d93f413 100644
> --- a/drivers/media/usb/uvc/uvc_entity.c
> +++ b/drivers/media/usb/uvc/uvc_entity.c
> @@ -88,6 +88,11 @@ static int uvc_mc_init_entity(struct uvc_video_chain
> *chain, if (ret < 0)
>  			return ret;
> 
> +		if (UVC_ENTITY_TYPE(entity) == UVC_ITT_CAMERA)
> +			entity->subdev.entity.function = 
MEDIA_ENT_F_CAM_SENSOR;
> +		else
> +			entity->subdev.entity.function = MEDIA_ENT_F_IO_V4L;
> +

I've discussed this some time ago with Hans (over IRC if I recall correctly). 
We need to define new functions, as not all UVC entities map to the existing 
ones. MEDIA_ENT_F_CAM_SENSOR should be fine for UVC_ITT_CAMERA, but 
MEDIA_ENT_F_IO_V4L isn't right as a default.

>  		ret = v4l2_device_register_subdev(&chain->dev->vdev,
>  						  &entity->subdev);
>  	} else if (entity->vdev != NULL) {

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2016-06-24 13:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-24 11:28 [PATCH 0/3] uvcvideo: a cosmetic fix and 2 new features Guennadi Liakhovetski
2016-06-24 11:28 ` [PATCH 1/3] uvcvideo: initialise the entity function field Guennadi Liakhovetski
2016-06-24 13:26   ` Laurent Pinchart [this message]
2016-06-24 11:29 ` [PATCH 2/3] uvcvideo: send a control event when a Control Change interrupt arrives Guennadi Liakhovetski
2016-06-24 11:29 ` [PATCH 3/3] uvcvideo: add a metadata device node Guennadi Liakhovetski
2016-06-24 12:46   ` kbuild test robot
2016-06-24 13:12   ` kbuild test robot
2016-12-02 10:53   ` [PATCH v2 " Guennadi Liakhovetski
2016-12-05 10:53     ` Laurent Pinchart
2016-12-05 15:35       ` Guennadi Liakhovetski
2016-12-05 22:06         ` Laurent Pinchart
2016-12-05 22:13           ` Guennadi Liakhovetski
2016-12-05 22:25             ` Laurent Pinchart
2016-12-06 10:39               ` Guennadi Liakhovetski
2016-12-06 15:56                 ` Laurent Pinchart
2016-12-08 13:34                   ` Guennadi Liakhovetski
2016-12-08 13:39                     ` Laurent Pinchart
2016-12-08 15:18                       ` Guennadi Liakhovetski

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=2830501.QdemJ557Im@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --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.