mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
rust: miscdevice: 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> Link: https://patch.msgid.link/20251222-cstr-char-misc-v1-1-d218537d28ab@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c1ea31205e
commit
582ce8ea20
1 changed files with 1 additions and 2 deletions
|
|
@ -98,7 +98,6 @@
|
|||
use core::pin::Pin;
|
||||
|
||||
use kernel::{
|
||||
c_str,
|
||||
device::Device,
|
||||
fs::{File, Kiocb},
|
||||
ioctl::{_IO, _IOC_SIZE, _IOR, _IOW},
|
||||
|
|
@ -133,7 +132,7 @@ impl kernel::InPlaceModule for RustMiscDeviceModule {
|
|||
pr_info!("Initialising Rust Misc Device Sample\n");
|
||||
|
||||
let options = MiscDeviceOptions {
|
||||
name: c_str!("rust-misc-device"),
|
||||
name: c"rust-misc-device",
|
||||
};
|
||||
|
||||
try_pin_init!(Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue