Lines Matching refs:Some

111     DEV_BLOCK_KSET_INSTANCE = Some(kset);  in set_sys_dev_block_kset()
115 DEV_CHAR_KSET_INSTANCE = Some(kset); in set_sys_dev_char_kset()
124 DEVICES_VIRTUAL_KSET_INSTANCE = Some(kset); in set_sys_devices_virtual_kset()
442 Some(&DeviceSysFSOps) in sysfs_ops()
500 if let Some(ref dev) = deivce_parent { in add_device()
508 if let Some(ref kobj) = kobject_parent { in add_device()
511 if let Some(kobject_parent) = kobject_parent { in add_device()
518 device.set_parent(Some(Arc::downgrade(&kobject_parent))); in add_device()
541 if let Some(bus) = device.bus().and_then(|bus| bus.upgrade()) { in add_device()
544 Some(&device), in add_device()
554 if let Some(class) = device.class() { in add_device()
578 if let Some(class_dir) = guard.get(&key) { in class_dir_create_and_add()
585 class_dir.set_kobj_type(Some(&ClassKObjbectType)); in class_dir_create_and_add()
586 class_dir.set_parent(Some(Arc::downgrade(&kobject_parent))); in class_dir_create_and_add()
616 if let Some(dp) = device_parent { in get_device_parent()
618 return Ok(Some(dp.clone() as Arc<dyn KObject>)); in get_device_parent()
631 return Ok(Some(kobject_parent)); in get_device_parent()
636 if let Some(bus) = device.bus().and_then(|bus| bus.upgrade()) { in get_device_parent()
637 if let Some(root) = bus.root_device().and_then(|x| x.upgrade()) { in get_device_parent()
638 return Ok(Some(root as Arc<dyn KObject>)); in get_device_parent()
643 if let Some(device_parent) = device_parent { in get_device_parent()
644 return Ok(Some(device_parent as Arc<dyn KObject>)); in get_device_parent()
701 sysfs_instance().create_link(Some(&dev_kobj), &subsys_kobj, "subsystem".to_string())?; in add_class_symlinks()
703 if let Some(dev_parent) = dev.dev_parent().and_then(|x| x.upgrade()) { in add_class_symlinks()
706 .create_link(Some(&dev_kobj), &parent_kobj, "device".to_string()) in add_class_symlinks()
713 .create_link(Some(&subsys_kobj), &dev_kobj, dev.name()) in add_class_symlinks()
730 if let Some(class) = dev.class() { in add_attrs()
737 if let Some(kobj_type) = dev.kobj_type() { in add_attrs()
746 if let Some(class) = dev.class() { in add_attrs()
752 if let Some(kobj_type) = dev.kobj_type() { in add_attrs()
839 return sysfs_instance().create_link(Some(&target_kobj), &current_kobj, name); in create_sys_dev_entry()
872 dev.set_kset(Some(sys_devices_kset())); in device_default_initialize()
873 dev.set_kobj_type(Some(&DeviceKObjType)); in device_default_initialize()
994 return Some(Arc::new(Self { data, allocated })); in new()
999 return Some(self.data.unwrap()); in id()
1007 self.allocated = Some(allocated); in set_allocated()
1102 self.inner().name = Some(name); in set_name()