Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: gadget: core: force synchronous registration

Registering a gadget driver is expected to complete synchronously and
immediately after calling driver_register() this function checks that
the driver has bound so as to return an error.

Set PROBE_FORCE_SYNCHRONOUS to ensure this is the case even when
asynchronous probing is set as the default.

Fixes: fc274c1e99731 ("USB: gadget: Add a new bus for gadgets")
Cc: stable@vger.kernel.org
Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Link: https://lore.kernel.org/r/20240913102325.2826261-1-jkeeping@inmusicbrands.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

John Keeping and committed by
Greg Kroah-Hartman
df915882 9852d85e

+1
+1
drivers/usb/gadget/udc/core.c
··· 1696 1696 driver->driver.bus = &gadget_bus_type; 1697 1697 driver->driver.owner = owner; 1698 1698 driver->driver.mod_name = mod_name; 1699 + driver->driver.probe_type = PROBE_FORCE_SYNCHRONOUS; 1699 1700 ret = driver_register(&driver->driver); 1700 1701 if (ret) { 1701 1702 pr_warn("%s: driver registration failed: %d\n",