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
..
acm_ms.c
audio.c usb: gadget: audio: Add HS/SS bInterval params for UAC2 2022-01-31 14:26:18 +01:00
cdc2.c
dbgp.c USB: gadget: Rename usb_gadget_probe_driver() 2022-04-26 14:00:13 +02:00
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
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile
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 usb: gadget: Use kstrtobool() instead of strtobool() 2022-11-03 23:46:01 +09:00
tcm_usb_gadget.c
webcam.c usb: gadget: webcam: Make g_webcam loadable again 2023-12-15 18:27:38 +01:00
zero.c