aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <[email protected]>2022-03-18 19:01:03 +0100
committerMauro Carvalho Chehab <[email protected]>2022-05-13 11:02:21 +0200
commit74ff2640152894abf4ff22041515359d165997c0 (patch)
tree38f1554fd4b3ff57c9f42e397a03b52f46f56bcc
parent7101d1279917e5c7fe897c275c5a0727fe90f3e3 (diff)
media: vsp1: Don't open-code vb2_fop_release()
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. Signed-off-by: Laurent Pinchart <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
-rw-r--r--drivers/media/platform/renesas/vsp1/vsp1_video.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/media/platform/renesas/vsp1/vsp1_video.c b/drivers/media/platform/renesas/vsp1/vsp1_video.c
index 497f352e9f8c..0180ffce35f7 100644
--- a/drivers/media/platform/renesas/vsp1/vsp1_video.c
+++ b/drivers/media/platform/renesas/vsp1/vsp1_video.c
@@ -1127,21 +1127,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;
}