1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
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 USB: gadget: legacy: fix return error code in acm_ms_bind() 2020-12-28 15:45:50 +01:00
audio.c usb: gadget: audio: Add HS/SS bInterval params for UAC2 2022-01-31 14:26:18 +01:00
cdc2.c usb: gadget: legacy: fix error return code in cdc_bind() 2020-05-09 11:05:08 +03:00
dbgp.c USB: gadget: Rename usb_gadget_probe_driver() 2022-04-26 14:00:13 +02:00
ether.c USB: gadget: legacy: fix an error code in eth_bind() 2021-01-31 13:53:39 +01:00
g_ffs.c usb: gadget: legacy: fix error return code in gfs_bind 2023-06-21 18:08:07 +02:00
gmidi.c usb: gadget: legacy: gmidi: remove useless cast for driver.name 2020-02-19 11:10:24 +01:00
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 usb: gadget: add raw-gadget interface 2020-03-15 11:34:48 +02:00
mass_storage.c usb: gadget: legacy: fix error return code of msg_bind() 2021-03-23 14:13:29 +01:00
multi.c USB: gadget: legacy: remove left-over __ref annotations 2021-03-23 12:57:10 +01:00
ncm.c usb: gadget: legacy: fix error return code in gncm_bind() 2020-05-09 11:05:08 +03:00
nokia.c usb: gadget: legacy: nokia: Remove unused static variable 'product_nokia' 2020-07-09 17:19:56 +02:00
printer.c usb: gadget: Add description for module parameter 2021-08-26 13:30:00 +02:00
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 usb: gadget: tcm: fix spelling mistake: "Manufactor" -> "Manufacturer" 2018-07-26 13:35:29 +03:00
webcam.c usb: gadget: webcam: Make g_webcam loadable again 2023-12-15 18:27:38 +01:00
zero.c USB: Fix up terminology 2020-07-01 14:04:04 +02:00