Re: [PATCH v6 5/5] drivers: Implement module modaliases for USB

From: Greg Kroah-Hartman
Date: Mon Dec 05 2022 - 10:53:23 EST


On Fri, Dec 02, 2022 at 04:47:44PM -0600, Allen Webb wrote:
> Add the per-subsystem logic needed to print match-based modaliases to
> the USB subsystem, so the modalias sysfs attribute for modules will
> function for modules that register USB drivers.
>
> Signed-off-by: Allen Webb <allenwebb@xxxxxxxxxx>
> ---
> drivers/base/Makefile | 2 +-
> drivers/base/base.h | 8 +
> drivers/base/mod_devicetable.c | 257 +++++++++++++++++++++++++++++++++
> drivers/usb/core/driver.c | 2 +

It feels like you have a lot of USB-specific stuff here in the driver
core, and not enough in the usb core. How is each different bus going
to do this? Add code to the driver core? It should be able to not
touch the driver core at all to add support for this for a new bus.

thanks,

greg k-h