diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-07-13 13:30:45 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-08-28 15:02:26 +0200 |
commit | f4ab5d0bf9d64437d9fca17338901d3408039719 (patch) | |
tree | f8d16f098ce6cb827883c800b465a88c496db175 /drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | |
parent | 11788d9b7e916f6e7ef5200cfe67158e67afd4d7 (diff) |
media: media/platform: 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.
Note that sun4i-csi didn't unregister the video device at all. That's
now fixed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c')
-rw-r--r-- | drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c index d9648b2810b9..b55de9ab64d8 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c @@ -660,13 +660,11 @@ int sun6i_video_init(struct sun6i_video *video, struct sun6i_csi *csi, if (ret < 0) { v4l2_err(&csi->v4l2_dev, "video_register_device failed: %d\n", ret); - goto release_vb2; + goto clean_entity; } return 0; -release_vb2: - vb2_queue_release(&video->vb2_vidq); clean_entity: media_entity_cleanup(&video->vdev.entity); mutex_destroy(&video->lock); @@ -675,8 +673,7 @@ clean_entity: void sun6i_video_cleanup(struct sun6i_video *video) { - video_unregister_device(&video->vdev); + vb2_video_unregister_device(&video->vdev); media_entity_cleanup(&video->vdev.entity); - vb2_queue_release(&video->vb2_vidq); mutex_destroy(&video->lock); } |