Lines Matching refs:dyn

56             .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>))));  in new()
71 fn dev_groups(&self) -> &'static [&'static dyn AttributeGroup] { in dev_groups()
80 fn probe(&self, device: &Arc<dyn Device>) -> Result<(), SystemError> { in probe()
82 let virtio_drv = drv.cast::<dyn VirtIODriver>().map_err(|_| { in probe()
90 let virtio_dev = device.clone().cast::<dyn VirtIODevice>().map_err(|_| { in probe()
101 fn remove(&self, _device: &Arc<dyn Device>) -> Result<(), SystemError> { in remove()
105 fn sync_state(&self, _device: &Arc<dyn Device>) { in sync_state()
109 fn shutdown(&self, _device: &Arc<dyn Device>) { in shutdown()
113 fn resume(&self, _device: &Arc<dyn Device>) -> Result<(), SystemError> { in resume()
120 _device: &Arc<dyn Device>, in match_device()
121 _driver: &Arc<dyn Driver>, in match_device()
123 let virtio_device = _device.clone().cast::<dyn VirtIODevice>().map_err(|_| { in match_device()
130 let virtio_driver = _driver.clone().cast::<dyn VirtIODriver>().map_err(|_| { in match_device()
172 pub fn register(&self, driver: Arc<dyn VirtIODriver>) -> Result<(), SystemError> { in register()
173 driver.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in register()
174 return driver_manager().register(driver as Arc<dyn Driver>); in register()
178 pub fn unregister(&self, driver: &Arc<dyn VirtIODriver>) { in unregister()
179 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
191 pub fn device_add(&self, dev: Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in device_add()
192 dev.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in device_add()
193 device_manager().device_default_initialize(&(dev.clone() as Arc<dyn Device>)); in device_add()
199 device_manager().add_device(dev.clone() as Arc<dyn Device>)?; in device_add()
201 .add_groups(&(dev.clone() as Arc<dyn Device>), &[&VirtIODeviceAttrGroup]); in device_add()
211 fn setup_irq(&self, dev: &Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in setup_irq()
244 pub fn device_remove(&self, dev: &Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in device_remove()
245 device_manager().remove(&(dev.clone() as Arc<dyn Device>)); in device_remove()
300 fn attrs(&self) -> &[&'static dyn Attribute] { in attrs()
321 fn show(&self, kobj: Arc<dyn KObject>, buf: &mut [u8]) -> Result<usize, SystemError> { in show()
322 let dev = kobj.cast::<dyn VirtIODevice>().map_err(|_| { in show()
348 fn show(&self, kobj: Arc<dyn KObject>, buf: &mut [u8]) -> Result<usize, SystemError> { in show()
349 let dev = kobj.cast::<dyn VirtIODevice>().map_err(|_| { in show()