Lines Matching defs:faux_device
31 /// The underlying `struct faux_device` is valid.
34 Opaque<bindings::faux_device>,
40 fn as_raw(&self) -> *mut bindings::faux_device {
46 /// `ptr` must be a valid pointer to a `struct faux_device`.
48 unsafe fn from_raw<'a>(ptr: *mut bindings::faux_device) -> &'a Self {
49 // SAFETY: `Device` is a transparent wrapper of `Opaque<bindings::faux_device>`.
58 // `struct faux_device`. `dev` points to a valid `struct device`.
63 // SAFETY: `faux::Device` is a transparent wrapper of `struct faux_device`.
66 const OFFSET: usize = core::mem::offset_of!(bindings::faux_device, dev);
71 /// This type represents the registration of a [`struct faux_device`]. When an instance of this type
76 /// - `self.0` always holds a valid pointer to an initialized and registered [`struct faux_device`].
79 /// [`struct faux_device`]: srctree/include/linux/device/faux.h
80 pub struct Registration(NonNull<bindings::faux_device>);
106 fn as_raw(&self) -> *mut bindings::faux_device {
115 // - The underlying `struct faux_device` is guaranteed by the C API to be a valid
130 // SAFETY: `self.0` is a valid registered faux_device via our type invariants.