summaryrefslogtreecommitdiff
path: root/rust/kernel/device.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/kernel/device.rs')
-rw-r--r--rust/kernel/device.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
index c6823decbb2e..e7a2024b88d5 100644
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@ -185,7 +185,7 @@ impl Device {
/// Checks if property is present or not.
pub fn property_present(&self, name: &CStr) -> bool {
// SAFETY: By the invariant of `CStr`, `name` is null-terminated.
- unsafe { bindings::device_property_present(self.as_raw().cast_const(), name.as_ptr() as *const _) }
+ unsafe { bindings::device_property_present(self.as_raw().cast_const(), name.as_char_ptr()) }
}
}