All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Eduard Gavin <egavinc@gmail.com>
Subject: Re: [PATCH 09/13] [media] tvp5150: create the expected number of pads
Date: Fri, 29 Jan 2016 15:21:25 -0300	[thread overview]
Message-ID: <56ABADA5.401@osg.samsung.com> (raw)
In-Reply-To: <32df4e6a3064a77fddf57a3c9816e3f0e2d0b8b4.1454067262.git.mchehab@osg.samsung.com>

Hello Mauro,

On 01/29/2016 09:10 AM, Mauro Carvalho Chehab wrote:
> The tvp5150 doesn't have just one pad. It has 3 ones:
> 	- IF input
> 	- Video output
> 	- VBI output
>
> Fix it and use the macros for the pad indexes.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
>   drivers/media/i2c/tvp5150.c | 11 ++++++++---
>   1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
> index 0ad122fcd632..20428f052506 100644
> --- a/drivers/media/i2c/tvp5150.c
> +++ b/drivers/media/i2c/tvp5150.c
> @@ -16,6 +16,7 @@
>   #include <media/i2c/tvp5150.h>
>   #include <media/v4l2-ctrls.h>
>   #include <media/v4l2-of.h>
> +#include <media/v4l2-mc.h>
>
>   #include "tvp5150_reg.h"
>
> @@ -37,7 +38,9 @@ MODULE_PARM_DESC(debug, "Debug level (0-2)");
>
>   struct tvp5150 {
>   	struct v4l2_subdev sd;
> -	struct media_pad pad;
> +#ifdef CONFIG_MEDIA_CONTROLLER
> +	struct media_pad pads[DEMOD_NUM_PADS];
> +#endif
>   	struct v4l2_ctrl_handler hdl;
>   	struct v4l2_rect rect;
>
> @@ -1313,8 +1316,10 @@ static int tvp5150_probe(struct i2c_client *c,
>   	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
>
>   #if defined(CONFIG_MEDIA_CONTROLLER)
> -	core->pad.flags = MEDIA_PAD_FL_SOURCE;
> -	res = media_entity_pads_init(&sd->entity, 1, &core->pad);
> +	core->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
> +	core->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
> +	core->pads[DEMOD_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE;
> +	res = media_entity_pads_init(&sd->entity, DEMOD_NUM_PADS, core->pads);
>   	if (res < 0)
>   		return res;
>   #endif
>

The patch looks good to me.

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

  reply	other threads:[~2016-01-29 18:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 12:10 [PATCH 00/13] Add media controller support to em28xx driver Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 01/13] [media] em28xx: remove unused input types Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 02/13] [media] xc2028: avoid use after free Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 03/13] [media] tuner.h: rename TUNER_PAD_IF_OUTPUT to TUNER_PAD_OUTPUT Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 04/13] [media] v4l2-mc.h: move tuner PAD definitions to this new header Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 05/13] [media] v4l2-mc.h: Split audio from baseband output Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 06/13] [media] media.h: add support for IF-PLL video/sound decoder Mauro Carvalho Chehab
2016-01-29 12:10   ` Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 07/13] [media] v4l2-mc.h Add pads for audio and video IF-PLL decoders Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 08/13] [media] v4l2-mc: add analog TV demodulator pad index macros Mauro Carvalho Chehab
2016-01-29 12:10 ` [PATCH 09/13] [media] tvp5150: create the expected number of pads Mauro Carvalho Chehab
2016-01-29 18:21   ` Javier Martinez Canillas [this message]
2016-01-29 12:11 ` [PATCH 10/13] [media] msp3400: initialize MC data Mauro Carvalho Chehab
2016-01-29 12:11 ` [PATCH 11/13] [media] tvp5150: identify it as a MEDIA_ENT_F_ATV_DECODER Mauro Carvalho Chehab
2016-01-29 18:22   ` Javier Martinez Canillas
2016-01-29 12:11 ` [PATCH 12/13] [media] saa7115: initialize demod type and add the needed pads Mauro Carvalho Chehab
2016-01-29 12:11 ` [PATCH 13/13] [media] em28xx: add media controller support Mauro Carvalho Chehab
2016-01-29 17:13   ` [PATCH v2 13/13]] " Mauro Carvalho Chehab
2016-01-29 12:37 ` [PATCH 00/13] Add media controller support to em28xx driver Mauro Carvalho Chehab
2016-01-29 17:21   ` Mauro Carvalho Chehab

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=56ABADA5.401@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=egavinc@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.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.