mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
rust: cpufreq: replace kernel::c_str! with C-Strings
C-String literals were added in Rust 1.77. Replace instances of `kernel::c_str!` with C-String literals where possible. 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> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
committed by
Viresh Kumar
parent
d6a6c58da3
commit
e05d9e5c8b
@@ -840,7 +840,6 @@ pub trait Driver {
|
||||
/// ```
|
||||
/// use kernel::{
|
||||
/// cpufreq,
|
||||
/// c_str,
|
||||
/// device::{Core, Device},
|
||||
/// macros::vtable,
|
||||
/// of, platform,
|
||||
@@ -853,7 +852,7 @@ pub trait Driver {
|
||||
///
|
||||
/// #[vtable]
|
||||
/// impl cpufreq::Driver for SampleDriver {
|
||||
/// const NAME: &'static CStr = c_str!("cpufreq-sample");
|
||||
/// const NAME: &'static CStr = c"cpufreq-sample";
|
||||
/// const FLAGS: u16 = cpufreq::flags::NEED_INITIAL_FREQ_CHECK | cpufreq::flags::IS_COOLING_DEV;
|
||||
/// const BOOST_ENABLED: bool = true;
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user