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.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
index eadc6160a4be..c6823decbb2e 100644
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@ -6,7 +6,7 @@
use crate::{
bindings,
- str::CString,
+ str::CStr,
types::{ARef, Opaque},
};
use core::{fmt, ptr};
@@ -183,8 +183,8 @@ impl Device {
}
/// Checks if property is present or not.
- pub fn property_present(&self, name: &CString) -> bool {
- // SAFETY: By the invariant of `CString`, `name` is null-terminated.
+ 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 _) }
}
}