Skip to content

Commit 23cd58b

Browse files
tamirdojeda
authored andcommitted
rust: cpufreq: 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: #1075 Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
1 parent a3a7d09 commit 23cd58b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/kernel/cpufreq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ impl<T: Driver> Registration<T> {
10161016
};
10171017

10181018
const fn copy_name(name: &'static CStr) -> [c_char; CPUFREQ_NAME_LEN] {
1019-
let src = name.as_bytes_with_nul();
1019+
let src = name.to_bytes_with_nul();
10201020
let mut dst = [0; CPUFREQ_NAME_LEN];
10211021

10221022
build_assert!(src.len() <= CPUFREQ_NAME_LEN);

0 commit comments

Comments
 (0)