summaryrefslogtreecommitdiff
path: root/drivers/staging/media/tegra-video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-07-13 13:30:48 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-08-28 15:06:17 +0200
commit2dc73489ae84f784448422a31f51501e520b073a (patch)
tree0a457e6cee1388ab5cc6303790ed78c7aeae2e0b /drivers/staging/media/tegra-video
parentbda24f433013d698467dea589e0fe37544c44fe0 (diff)
media: staging/media: drop vb2_queue_release()
This is only needed for drivers that do not use vb2_fop_release(). Note that vb2_queue_release() is *not* the counterpart of vb2_queue_init() as some drivers here seem to think. Also use vb2_video_unregister_device() to automatically stop streaming at unregister time for those drivers that set vdev->queue. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/tegra-video')
-rw-r--r--drivers/staging/media/tegra-video/vi.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c
index 1b5e660155f5..a3b9b212f8c8 100644
--- a/drivers/staging/media/tegra-video/vi.c
+++ b/drivers/staging/media/tegra-video/vi.c
@@ -795,12 +795,8 @@ void tegra_v4l2_nodes_cleanup_tpg(struct tegra_video_device *vid)
struct tegra_csi_channel *csi_chan;
struct tegra_vi_channel *chan;
- list_for_each_entry(chan, &vi->vi_chans, list) {
- video_unregister_device(&chan->video);
- mutex_lock(&chan->video_lock);
- vb2_queue_release(&chan->queue);
- mutex_unlock(&chan->video_lock);
- }
+ list_for_each_entry(chan, &vi->vi_chans, list)
+ vb2_video_unregister_device(&chan->video);
list_for_each_entry(csi_chan, &csi->csi_chans, list)
v4l2_device_unregister_subdev(&csi_chan->subdev);