linux/drivers/usb/gadget/legacy
Andrzej Pietrasiewicz f1fd91a092 usb: gadget: webcam: Make g_webcam loadable again
commit 588b9e8560 ("usb: gadget: uvc: add v4l2 enumeration api calls")
has rendered the precomposed (aka legacy) webcam gadget unloadable.

uvc_alloc() since then has depended on certain config groups being
available in configfs tree related to the UVC function. However, legacy
gadgets do not create anything in configfs, so uvc_alloc() must fail
with -ENOENT no matter what.

This patch mimics the required configfs hierarchy to satisfy the code which
inspects formats and frames found in uvcg_streaming_header.

This has been tested with guvcview on the host side, using vivid as a
source of video stream on the device side and using the userspace program
found at https://gitlab.freedesktop.org/camera/uvc-gadget.git.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Fixes: 588b9e8560 ("usb: gadget: uvc: add v4l2 enumeration api calls")
Link: https://lore.kernel.org/r/20231215131614.29132-1-andrzej.p@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-15 18:27:38 +01:00
..
Kconfig
Makefile
acm_ms.c
audio.c
cdc2.c
dbgp.c
ether.c
g_ffs.c usb: gadget: legacy: fix error return code in gfs_bind 2023-06-21 18:08:07 +02:00
gmidi.c
hid.c usb: gadget: hid: Convert to platform remove callback returning void 2023-05-28 12:36:25 +01:00
inode.c USB/Thunderbolt changes for 6.7-rc1 2023-11-03 16:00:42 -10:00
mass_storage.c
multi.c
ncm.c
nokia.c
printer.c
raw_gadget.c usb: raw-gadget: report suspend, resume, reset, and disconnect events 2023-10-27 12:58:16 +02:00
serial.c
tcm_usb_gadget.c
webcam.c usb: gadget: webcam: Make g_webcam loadable again 2023-12-15 18:27:38 +01:00
zero.c