Lines Matching refs:minor
33 int minor = iminor(inode);
39 c = usb_minors[minor];
141 * usb_register_dev - register a USB device, and ask for a minor number
146 * If CONFIG_USB_DYNAMIC_MINORS is enabled, the minor number will be
148 * enabled, the minor number will be based on the next available free minor,
154 * the minor numbers given out by this function.
164 int minor;
172 * no holes in the minor range.
179 if (intf->minor >= 0)
186 dev_dbg(&intf->dev, "looking for a minor, starting at %d", minor_base);
189 for (minor = minor_base; minor < MAX_USB_MINORS; ++minor) {
190 if (usb_minors[minor])
193 usb_minors[minor] = class_driver->fops;
194 intf->minor = minor;
198 if (intf->minor < 0)
202 snprintf(name, sizeof(name), class_driver->name, minor - minor_base);
209 MKDEV(USB_MAJOR, minor), class_driver,
213 usb_minors[minor] = NULL;
214 intf->minor = -1;
223 * usb_deregister_dev - deregister a USB device's dynamic minor.
228 * when the USB driver is finished with the minor numbers gotten from a
246 if (intf->minor == -1)
249 dbg ("removing %d minor", intf->minor);
252 usb_minors[intf->minor] = NULL;
255 snprintf(name, sizeof(name), class_driver->name, intf->minor - minor_base);
256 device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
258 intf->minor = -1;