Lines Matching full:minor
26 * Handling of mouse minor numbers for kerneld:
80 static void misc_minor_free(int minor) in misc_minor_free() argument
82 if (minor < DYNAMIC_MINORS) in misc_minor_free()
83 ida_free(&misc_minors_ida, DYNAMIC_MINORS - minor - 1); in misc_minor_free()
84 else if (minor > MISC_DYNAMIC_MINOR) in misc_minor_free()
85 ida_free(&misc_minors_ida, minor); in misc_minor_free()
109 seq_printf(seq, "%3i %s\n", p->minor, p->name ? p->name : ""); in misc_seq_show()
124 int minor = iminor(inode); in misc_open() local
132 if (iter->minor != minor) in misc_open()
141 request_module("char-major-%d-%d", MISC_MAJOR, minor); in misc_open()
145 if (iter->minor != minor) in misc_open()
197 * Register a miscellaneous device with the kernel. If the minor
198 * number is set to %MISC_DYNAMIC_MINOR a minor number is assigned
199 * and placed in the minor field of the structure. For other cases
200 * the minor number requested is used.
215 bool is_dynamic = (misc->minor == MISC_DYNAMIC_MINOR); in misc_register()
228 misc->minor = i; in misc_register()
233 if (c->minor == misc->minor) { in misc_register()
240 dev = MKDEV(MISC_MAJOR, misc->minor); in misc_register()
247 misc_minor_free(misc->minor); in misc_register()
248 misc->minor = MISC_DYNAMIC_MINOR; in misc_register()
280 device_destroy(&misc_class, MKDEV(MISC_MAJOR, misc->minor)); in misc_deregister()
281 misc_minor_free(misc->minor); in misc_deregister()