Lines Matching defs:as_raw
210 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
211 let private = unsafe { (*self.as_raw()).p };
229 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
230 unsafe { bindings::dev_set_drvdata(self.as_raw(), data.into_foreign().cast()) };
243 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
244 let ptr = unsafe { bindings::dev_get_drvdata(self.as_raw()) };
246 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
247 unsafe { bindings::dev_set_drvdata(self.as_raw(), core::ptr::null_mut()) };
285 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
286 let ptr = unsafe { bindings::dev_get_drvdata(self.as_raw()) };
297 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
298 let private = unsafe { (*self.as_raw()).p };
321 // SAFETY: By the type invariants, `self.as_raw()` is a valid pointer to a `struct device`.
322 if unsafe { bindings::dev_get_drvdata(self.as_raw()) }.is_null() {
338 pub(crate) fn as_raw(&self) -> *mut bindings::device {
346 // - By the type invariant `self.as_raw()` is always valid.
348 let parent = unsafe { (*self.as_raw()).parent };
464 // SAFETY: `klevel` is null-terminated and one of the kernel constants. `self.as_raw`
471 self.as_raw(),
481 let fwnode_handle = unsafe { bindings::__dev_fwnode(self.as_raw()) };
499 // SAFETY: By its type invariant `self.as_raw()` is a valid pointer to a `struct device`.
501 unsafe { CStr::from_char_ptr(bindings::dev_name(self.as_raw())) }
514 unsafe { bindings::get_device(self.as_raw()) };
648 let raw = dev.as_raw();