Commit 7ad635c9 authored by Tamir Duberstein's avatar Tamir Duberstein Committed by Miguel Ojeda
Browse files

rust: auxiliary: use `core::ffi::CStr` method names

Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoid methods that only exist on the latter.

Link: https://github.com/Rust-for-Linux/linux/issues/1075


Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Reviewed-by: default avatarBenno Lossin <lossin@kernel.org>
Acked-by: default avatarDanilo Krummrich <dakr@kernel.org>
Signed-off-by: default avatarTamir Duberstein <tamird@gmail.com>
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 7dfabaa0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -105,8 +105,8 @@ macro_rules! module_auxiliary_driver {
impl DeviceId {
    /// Create a new [`DeviceId`] from name.
    pub const fn new(modname: &'static CStr, name: &'static CStr) -> Self {
        let name = name.as_bytes_with_nul();
        let modname = modname.as_bytes_with_nul();
        let name = name.to_bytes_with_nul();
        let modname = modname.to_bytes_with_nul();

        // TODO: Replace with `bindings::auxiliary_device_id::default()` once stabilized for
        // `const`.