Lines Matching refs:Device
63 let adev = unsafe { &*adev.cast::<Device<device::CoreInternal>>() }; in probe_callback()
83 let adev = unsafe { &*adev.cast::<Device<device::CoreInternal>>() }; in remove_callback()
187 fn probe(dev: &Device<device::Core>, id_info: &Self::IdInfo) -> Result<Pin<KBox<Self>>>; in probe()
201 pub struct Device<Ctx: device::DeviceContext = device::Normal>( struct
206 impl<Ctx: device::DeviceContext> Device<Ctx> { impls
219 pub fn parent(&self) -> Option<&device::Device> { in parent() argument
222 let ptr: *const Device = ptr.cast(); in parent()
230 impl Device { implementation
244 kernel::impl_device_context_deref!(unsafe { Device });
245 kernel::impl_device_context_into_aref!(Device);
248 unsafe impl crate::types::AlwaysRefCounted for Device { implementation
267 impl<Ctx: device::DeviceContext> AsRef<device::Device<Ctx>> for Device<Ctx> { implementation
268 fn as_ref(&self) -> &device::Device<Ctx> { in as_ref()
274 unsafe { device::Device::from_raw(dev) } in as_ref()
279 unsafe impl Send for Device {} implementation
283 unsafe impl Sync for Device {} implementation
298 pub fn new(parent: &device::Device, name: &CStr, id: u32, modname: &CStr) -> Result<Self> { in new() argument
305 (*adev).dev.release = Some(Device::release); in new()