Re: [PATCH v4 1/2] usb: core: export the generic device driver's operations

From: Alan Stern

Date: Fri Nov 06 2026 - 12:02:40 EST


On Fri, Nov 06, 2026 at 01:12:50PM +0700, James Clark wrote:
> Export usb_generic_driver_probe(), usb_generic_driver_disconnect(),
> usb_generic_driver_suspend() and usb_generic_driver_resume(), and move
> their declarations to include/linux/usb.h. This lets a driver whose
> probe may return -EPROBE_DEFER leave generic_subclass unset and call
> them itself, so that it can defer before the device is configured.
>
> Say in the generic_subclass kerneldoc not to set it in that case.
>
> Signed-off-by: James Clark <jjc@xxxxxxxxxx>
> ---

It's ironic that the generic_subclass thing was added to support
onboard_usb_dev, after some debate about whether it would be better just
to export the generic callbacks. Now you're going to implement the
alternative solution for onboard_usb_dev, while other drivers continue
to use generic_subclass.

Oh well, I guess there's nothing wrong with having two ways to do it.

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

Alan Stern