On Wed, Nov 09, 2011 at 10:45:00PM +0800, Huajun Li wrote: > Hi , > While working on a new USB serial driver, I find it need call > usb_serial_register() to register a serial driver, then call > usb_register() to register the USB one. So calling > usb_serial_register() is common for most of USB serial drivers, > moreover, these drivers are using usb_searil_probe() to probe the USB > devices. Then, how about move the calling of usb_serial_register() > from these modules' init routine into usb_serial_probe() ? > > From logical side, maybe it is reasonable: While initiating the > module, it only registers a USB driver as what other usual USB drivers > do, and passes the customized serial driver information through > 'driver_info'. When the driver does probing, it can retrieve serial > driver information from 'driver_info' to registers a serial driver to > system in order to talk with other subsystem. > > Does this changes make sense to go ahead ? Not really, you want to register with both "busses" as this is a driver that bridges the two types of devices, and as such, it follows the ways of almost all kernel drivers. I understand the idea for the change, but a "lazy" registration here will probably break the ability to add new device ids to the driver before you plug the device in, right? And we can't break that. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html