Lines Matching full:minor

92  * usb_register_dev - register a USB device, and ask for a minor number
97 * If CONFIG_USB_DYNAMIC_MINORS is enabled, the minor number will be
99 * enabled, the minor number will be based on the next available free minor,
105 * the minor numbers given out by this function.
115 int minor; in usb_register_dev() local
122 * no holes in the minor range. in usb_register_dev()
129 if (intf->minor >= 0) in usb_register_dev()
132 dev_dbg(&intf->dev, "looking for a minor, starting at %d\n", minor_base); in usb_register_dev()
135 for (minor = minor_base; minor < MAX_USB_MINORS; ++minor) { in usb_register_dev()
136 if (usb_minors[minor]) in usb_register_dev()
139 usb_minors[minor] = class_driver->fops; in usb_register_dev()
140 intf->minor = minor; in usb_register_dev()
143 if (intf->minor < 0) { in usb_register_dev()
149 snprintf(name, sizeof(name), class_driver->name, minor - minor_base); in usb_register_dev()
151 MKDEV(USB_MAJOR, minor), class_driver, in usb_register_dev()
154 usb_minors[minor] = NULL; in usb_register_dev()
155 intf->minor = -1; in usb_register_dev()
164 * usb_deregister_dev - deregister a USB device's dynamic minor.
169 * when the USB driver is finished with the minor numbers gotten from a
180 if (intf->minor == -1) in usb_deregister_dev()
183 dev_dbg(&intf->dev, "removing %d minor\n", intf->minor); in usb_deregister_dev()
184 device_destroy(&usbmisc_class, MKDEV(USB_MAJOR, intf->minor)); in usb_deregister_dev()
187 usb_minors[intf->minor] = NULL; in usb_deregister_dev()
191 intf->minor = -1; in usb_deregister_dev()