public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
	mchehab@osg.samsung.com,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Subject: Re: [PATCH 3/3] v4l: subdev: Call pad init_cfg operation when opening subdevs
Date: Mon, 09 May 2016 19:18:11 +0300	[thread overview]
Message-ID: <2951447.PnEFV895ES@avalon> (raw)
In-Reply-To: <1462361133-23887-4-git-send-email-sakari.ailus@linux.intel.com>

Hi Sakari,

On Wednesday 04 May 2016 14:25:33 Sakari Ailus wrote:
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> The subdev core code currently rely on the subdev open handler to
> initialize the file handle's pad configuration, even though subdevs now
> have a pad operation dedicated for that purpose.
> 
> As a first step towards migration to init_cfg, call the operation
> operation in the subdev core open implementation. Subdevs that are
> haven't been moved to init_cfg yet will just continue implementing pad
> config initialization in their open handler.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/media/v4l2-core/v4l2-subdev.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c
> b/drivers/media/v4l2-core/v4l2-subdev.c index 224ea60..9cbd011 100644
> --- a/drivers/media/v4l2-core/v4l2-subdev.c
> +++ b/drivers/media/v4l2-core/v4l2-subdev.c
> @@ -85,6 +85,8 @@ static int subdev_open(struct file *file)
>  	}
>  #endif
> 
> +	v4l2_subdev_call(sd, pad, init_cfg, subdev_fh->pad);
> +

Given that v4l2_subdev_alloc_pad_config(), called by subdev_fh_init(), already 
calls the init_cfg operation, is this still needed ?

>  	if (sd->internal_ops && sd->internal_ops->open) {
>  		ret = sd->internal_ops->open(sd, subdev_fh);
>  		if (ret < 0)

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2016-05-09 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-04 11:25 [PATCH 0/3] Media device file handle support, prepare for requests Sakari Ailus
2016-05-04 11:25 ` [PATCH 1/3] media: Move media_device link_notify operation to an ops structure Sakari Ailus
2016-05-04 11:25 ` [PATCH 2/3] media: Add per-file-handle data support Sakari Ailus
2016-05-04 12:47   ` Hans Verkuil
2016-05-04 11:25 ` [PATCH 3/3] v4l: subdev: Call pad init_cfg operation when opening subdevs Sakari Ailus
2016-05-04 12:47   ` Hans Verkuil
2016-05-09 16:18   ` Laurent Pinchart [this message]
2016-05-09 21:02     ` Sakari Ailus
2016-05-04 12:26 ` [PATCH 1/3] media: Move media_device link_notify operation to an ops structure Sakari Ailus
2016-05-04 12:43   ` 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=2951447.PnEFV895ES@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=sakari.ailus@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox