diff options
Diffstat (limited to 'rust/kernel/of.rs')
| -rw-r--r-- | rust/kernel/of.rs | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/of.rs b/rust/kernel/of.rs index b76b35265df2..58b20c367f99 100644 --- a/rust/kernel/of.rs +++ b/rust/kernel/of.rs @@ -34,7 +34,7 @@ unsafe impl RawDeviceIdIndex for DeviceId {  impl DeviceId {      /// Create a new device id from an OF 'compatible' string.      pub const fn new(compatible: &'static CStr) -> Self { -        let src = compatible.as_bytes_with_nul(); +        let src = compatible.to_bytes_with_nul();          // Replace with `bindings::of_device_id::default()` once stabilized for `const`.          // SAFETY: FFI type is valid to be zero-initialized.          let mut of: bindings::of_device_id = unsafe { core::mem::zeroed() };  | 
