Lines Matching defs:miscdevice
7 //! C headers: [`include/linux/miscdevice.h`](srctree/include/linux/miscdevice.h).
27 /// The name of the miscdevice.
33 pub const fn into_raw<T: MiscDevice>(self) -> bindings::miscdevice {
35 let mut result: bindings::miscdevice = unsafe { MaybeUninit::zeroed().assume_init() };
43 /// A registration of a miscdevice.
47 /// - `inner` contains a `struct miscdevice` that is registered using
52 /// - `inner` wraps a valid, pinned `miscdevice` created using
58 inner: Opaque<bindings::miscdevice>,
73 inner <- Opaque::try_ffi_init(move |slot: *mut bindings::miscdevice| {
77 // SAFETY: We just wrote the misc device options to the slot. The miscdevice will
89 pub fn as_raw(&self) -> *mut bindings::miscdevice {
99 // before the underlying `struct miscdevice` is destroyed.
185 /// A vtable for the file operations of a Rust miscdevice.
203 // SAFETY: This is a miscdevice, so `misc_open()` set the private data to a pointer to the
204 // associated `struct miscdevice` before calling into this method. Furthermore,
205 // `misc_open()` ensures that the miscdevice can't be unregistered and freed during this