Lines Matching full:minor

138  * usb_register_dev - register a USB device, and ask for a minor number
143 * If CONFIG_USB_DYNAMIC_MINORS is enabled, the minor number will be
145 * enabled, the minor number will be based on the next available free minor,
151 * the minor numbers given out by this function.
161 int minor; in usb_register_dev() local
168 * no holes in the minor range. in usb_register_dev()
175 if (intf->minor >= 0) in usb_register_dev()
185 dev_dbg(&intf->dev, "looking for a minor, starting at %d\n", minor_base); in usb_register_dev()
188 for (minor = minor_base; minor < MAX_USB_MINORS; ++minor) { in usb_register_dev()
189 if (usb_minors[minor]) in usb_register_dev()
192 usb_minors[minor] = class_driver->fops; in usb_register_dev()
193 intf->minor = minor; in usb_register_dev()
196 if (intf->minor < 0) { in usb_register_dev()
202 snprintf(name, sizeof(name), class_driver->name, minor - minor_base); in usb_register_dev()
204 MKDEV(USB_MAJOR, minor), class_driver, in usb_register_dev()
207 usb_minors[minor] = NULL; in usb_register_dev()
208 intf->minor = -1; in usb_register_dev()
217 * usb_deregister_dev - deregister a USB device's dynamic minor.
222 * when the USB driver is finished with the minor numbers gotten from a
233 if (intf->minor == -1) in usb_deregister_dev()
236 dev_dbg(&intf->dev, "removing %d minor\n", intf->minor); in usb_deregister_dev()
237 device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor)); in usb_deregister_dev()
240 usb_minors[intf->minor] = NULL; in usb_deregister_dev()
244 intf->minor = -1; in usb_deregister_dev()