mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 10:32:35 +00:00
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 <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
7101d12799
commit
74ff264015
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user