linux/drivers/media/test-drivers
Hans Verkuil 9e5f21d656 media: vivid: fix 'disconnect' error injection
The 'disconnect' error injection functionality suffered from bit rot.

New device nodes were added without updating vivid_user_gen_s_ctrl(), so
that function had to be updated for the new device nodes.

Also, vivid didn't check if specific device nodes were actually ever
created, so the vivid_is_last_user() would fail on that (it would return
true instead of false in that case).

Finally, selecting Disconnect, then unbind the vivid driver would fail
since the remove() would think that the device nodes were already
unregistered. Keep track of whether disconnect was pressed and re-register
the device nodes in remove() before doing the real unregister.

[hverkuil: unsigned uses -> unsigned int uses]

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-12-07 15:07:51 +01:00
..
vicodec media: vicodec: mark the stateless FWHT API as stable 2020-12-03 12:27:33 +01:00
vidtv media: vidtv.rst: add kernel-doc markups 2020-11-26 08:05:24 +01:00
vimc media: media/test-drivers: use vb2_video_unregister_device() 2020-08-28 15:05:40 +02:00
vivid media: vivid: fix 'disconnect' error injection 2020-12-07 15:07:51 +01:00
Kconfig media: media/test-drivers/Kconfig: fix broken Kconfig 2020-09-12 10:21:01 +02:00
Makefile media: vidtv: implement a tuner driver 2020-09-12 09:42:16 +02:00
vim2m.c media: vim2m: Register video device after setting up internals 2020-11-17 07:12:18 +01:00