linux/drivers/media/common
Hans Verkuil f729ef5796 media: videobuf2-v4l2.c: add vb2_video_unregister_device helper function
If a driver calls (_)vb2_fop_release(), then such a driver should also
call vb2_video_unregister_device() instead of video_unregister_device().
This helper will call vb2_queue_release() if a filehandle is marked as
owner of the queue. This ensures that at unregister time any streaming
is cancelled and all buffers are returned to userspace.

This is very useful for complex drivers since this stops all streaming
in all subdevs in the pipeline controlled by this video device. Otherwise
this would be delayed until the owner filehandle is closed, which can be
quite some time later.

Bonus points for ordering the includes :-)

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-08-28 14:58:48 +02:00
..
b2c2 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
saa7146 media: media/common/saa7146: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:53:30 +01:00
siano media: siano: Use scnprintf() for avoiding potential buffer overflow 2020-03-20 16:28:07 +01:00
v4l2-tpg media: tpg: Add function to return colors' order of test image 2020-07-19 13:38:56 +02:00
videobuf2 media: videobuf2-v4l2.c: add vb2_video_unregister_device helper function 2020-08-28 14:58:48 +02:00
btcx-risc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cx2341x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
cypress_firmware.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
cypress_firmware.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig media: dvb-usb: auto-select CYPRESS_FIRMWARE 2020-04-14 10:29:04 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tveeprom.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00