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: fc274c1e99
("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>
This commit is contained in:
parent
9852d85ec9
commit
df9158826b
@ -1696,6 +1696,7 @@ int usb_gadget_register_driver_owner(struct usb_gadget_driver *driver,
|
||||
driver->driver.bus = &gadget_bus_type;
|
||||
driver->driver.owner = owner;
|
||||
driver->driver.mod_name = mod_name;
|
||||
driver->driver.probe_type = PROBE_FORCE_SYNCHRONOUS;
|
||||
ret = driver_register(&driver->driver);
|
||||
if (ret) {
|
||||
pr_warn("%s: driver registration failed: %d\n",
|
||||
|
Loading…
Reference in New Issue
Block a user