Lines Matching refs:major
119 fn major_to_index(major: usize) -> usize { in major_to_index()
120 return major % CHARDEV_MAJOR_HASH_SIZE; in major_to_index()
142 if item.device_number().major() == index { in find_dynamic_major()
194 let mut major = device_number.major(); in __register_chardev_region() localVariable
196 if major >= CHARDEV_MAJOR_MAX { in __register_chardev_region()
200 major, in __register_chardev_region()
208 let chardev = CharDeviceStruct::new(mkdev(major, baseminor), minorct, name); in __register_chardev_region()
209 if major == 0 { in __register_chardev_region()
211 major = Self::find_dynamic_major().expect("Find synamic major error.\n"); in __register_chardev_region()
213 if let Some(items) = CHARDEVS.0.lock().0.get_mut(Self::major_to_index(major)) { in __register_chardev_region()
217 match item.device_number().major().cmp(&major) { in __register_chardev_region()
235 return Ok(mkdev(major, baseminor)); in __register_chardev_region()
251 .get_mut(Self::major_to_index(device_number.major())) in __unregister_chardev_region()