usb_register_dev (9) - Linux Man Pages
usb_register_dev: register a USB device, and ask for a minor number
usb_register_dev - register a USB device, and ask for a minor number
int usb_register_dev(struct usb_interface
*intf, struct usb_class_driver *class_driver);
- pointer to the usb_interface that is being registered
- pointer to the usb_class_driver for this device
This should be called by all USB drivers that use the USB major number. If CONFIG_USB_DYNAMIC_MINORS is enabled, the minor number will be dynamically allocated out of the list of available ones. If it is not enabled, the minor number will be based on the next available free minor, starting at the class_driver->minor_base.
This function also creates a usb class device in the sysfs tree.