All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	Tomasz Figa <tfiga@chromium.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH 2/3] media: vsp1: Don't open-code vb2_fop_release()
Date: Fri, 18 Mar 2022 21:44:03 +0000	[thread overview]
Message-ID: <164763984378.2211712.3085801061791359128@Monstersaurus> (raw)
In-Reply-To: <20220318211446.11543-3-laurent.pinchart+renesas@ideasonboard.com>

Quoting Laurent Pinchart (2022-03-18 21:14:45)
> Use the vb2_fop_release() helper to replace the open-coded version. The
> video->lock is assigned to the queue lock, used by vb2_fop_release(), so
> the only functional difference is that v4l2_fh_release() is now called
> before vsp1_device_put(). This should be harmless.
> 

Seems to check out.

Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  drivers/media/platform/renesas/vsp1/vsp1_video.c | 10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/media/platform/renesas/vsp1/vsp1_video.c b/drivers/media/platform/renesas/vsp1/vsp1_video.c
> index 044eb5778820..8f53abc71db2 100644
> --- a/drivers/media/platform/renesas/vsp1/vsp1_video.c
> +++ b/drivers/media/platform/renesas/vsp1/vsp1_video.c
> @@ -1129,19 +1129,11 @@ static int vsp1_video_open(struct file *file)
>  static int vsp1_video_release(struct file *file)
>  {
>         struct vsp1_video *video = video_drvdata(file);
> -       struct v4l2_fh *vfh = file->private_data;
>  
> -       mutex_lock(&video->lock);
> -       if (video->queue.owner == vfh) {
> -               vb2_queue_release(&video->queue);
> -               video->queue.owner = NULL;
> -       }
> -       mutex_unlock(&video->lock);
> +       vb2_fop_release(file);
>  
>         vsp1_device_put(video->vsp1);
>  
> -       v4l2_fh_release(file);
> -
>         file->private_data = NULL;
>  
>         return 0;
> -- 
> Regards,
> 
> Laurent Pinchart
>

  reply	other threads:[~2022-03-18 21:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18 21:14 [PATCH 0/3] media: videobuf2: Expose vb2_queue_is_busy() to drivers Laurent Pinchart
2022-03-18 21:14 ` [PATCH 1/3] media: videobuf2-v4l2: " Laurent Pinchart
2022-03-18 21:39   ` Kieran Bingham
2022-03-18 21:14 ` [PATCH 2/3] media: vsp1: Don't open-code vb2_fop_release() Laurent Pinchart
2022-03-18 21:44   ` Kieran Bingham [this message]
2022-05-06 10:12   ` [PATCH v2 " Laurent Pinchart
2022-03-18 21:14 ` [PATCH 3/3] media: vsp1: Use vb2_queue_is_busy() Laurent Pinchart
2022-03-18 21:40   ` Kieran Bingham
2022-07-06  5:34   ` Tomasz Figa

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=164763984378.2211712.3085801061791359128@Monstersaurus \
    --to=kieran.bingham@ideasonboard.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=tfiga@chromium.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.