rust: firmware: 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
Tamir Duberstein
2025-08-13 11:41:57 -04:00
committed by Miguel Ojeda
parent 23218425cb
commit 141ba59cc9

View File

@@ -291,7 +291,7 @@ const fn push_module_name(self) -> Self {
let module_name = this.module_name;
if !this.module_name.is_empty() {
this = this.push_internal(module_name.as_bytes_with_nul());
this = this.push_internal(module_name.to_bytes_with_nul());
if N != 0 {
// Re-use the space taken by the NULL terminator and swap it with the '.' separator.