Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1284700 > unrolled thread

Re: [PATCH 2/5] [media] v4l: vsp1: create pad links after subdev registration

Started byLaurent Pinchart <laurent.pinchart@ideasonboard.com>
First post2015-12-06 03:50 +0100
Last post2015-12-06 03:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 2/5] [media] v4l: vsp1: create pad links after subdev registration Laurent Pinchart <laurent.pinchart@ideasonboard.com> - 2015-12-06 03:50 +0100

#1284700 — Re: [PATCH 2/5] [media] v4l: vsp1: create pad links after subdev registration

FromLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Date2015-12-06 03:50 +0100
SubjectRe: [PATCH 2/5] [media] v4l: vsp1: create pad links after subdev registration
Message-ID<qCxyF-TZ-5@gated-at.bofh.it>
Hi Javier,

Thank you for the patch.

On Thursday 03 September 2015 18:00:33 Javier Martinez Canillas wrote:
> The vsp1 driver creates the pads links before the media entities are
> registered with the media device. This doesn't work now that object
> IDs are used to create links so the media_device has to be set.
> 
> Move entities registration logic before pads links creation.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 
>  drivers/media/platform/vsp1/vsp1_drv.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/media/platform/vsp1/vsp1_drv.c
> b/drivers/media/platform/vsp1/vsp1_drv.c index 9cd94a76a9ed..2aa427d3ff39
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/vsp1/vsp1_drv.c
> @@ -250,6 +250,14 @@ static int vsp1_create_entities(struct vsp1_device
> *vsp1) list_add_tail(&wpf->entity.list_dev, &vsp1->entities);
>  	}
> 
> +	/* Register all subdevs. */
> +	list_for_each_entry(entity, &vsp1->entities, list_dev) {
> +		ret = v4l2_device_register_subdev(&vsp1->v4l2_dev,
> +						  &entity->subdev);
> +		if (ret < 0)
> +			goto done;
> +	}
> +
>  	/* Create links. */
>  	list_for_each_entry(entity, &vsp1->entities, list_dev) {
>  		if (entity->type == VSP1_ENTITY_LIF ||
> @@ -269,14 +277,6 @@ static int vsp1_create_entities(struct vsp1_device
> *vsp1) return ret;
>  	}
> 
> -	/* Register all subdevs. */
> -	list_for_each_entry(entity, &vsp1->entities, list_dev) {
> -		ret = v4l2_device_register_subdev(&vsp1->v4l2_dev,
> -						  &entity->subdev);
> -		if (ret < 0)
> -			goto done;
> -	}
> -
>  	ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
> 
>  done:

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web