summaryrefslogtreecommitdiff
path: root/rust/kernel/drm/device.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/drm/device.rs')
-rw-r--r--rust/kernel/drm/device.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs
index 16935f42fe2e..32029fde55eb 100644
--- a/rust/kernel/drm/device.rs
+++ b/rust/kernel/drm/device.rs
@@ -154,7 +154,7 @@ impl<T: drm::Driver> Device<T> {
/// Additionally, callers must ensure that the `struct device`, `ptr` is pointing to, is
/// embedded in `Self`.
#[doc(hidden)]
- pub unsafe fn as_ref<'a>(ptr: *const bindings::drm_device) -> &'a Self {
+ pub unsafe fn from_raw<'a>(ptr: *const bindings::drm_device) -> &'a Self {
// SAFETY: By the safety requirements of this function `ptr` is a valid pointer to a
// `struct drm_device` embedded in `Self`.
let ptr = unsafe { Self::from_drm_device(ptr) };