summaryrefslogtreecommitdiff
path: root/rust/kernel/configfs.rs
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2025-10-18 15:16:33 -0400
committerMiguel Ojeda <ojeda@kernel.org>2025-10-22 07:14:57 +0200
commit3b46f65355c9627efd2dd8180c96b006a44d30f8 (patch)
tree2df1bb17ab80e91ee01a9033d6b4099a59eb2173 /rust/kernel/configfs.rs
parent965a39a9627bfaee5a4f7471097439da19008338 (diff)
rust: configfs: use `CStr::as_char_ptr`
Replace the use of `as_ptr` which works through `<CStr as Deref<Target=&[u8]>::deref()` in preparation for replacing `kernel::str::CStr` with `core::ffi::CStr` as the latter does not implement `Deref<Target=&[u8]>`. Signed-off-by: Tamir Duberstein <tamird@gmail.com> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://patch.msgid.link/20251018-cstr-core-v18-12-9378a54385f8@gmail.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/configfs.rs')
-rw-r--r--rust/kernel/configfs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs
index 10f1547ca9f1..466fb7f40762 100644
--- a/rust/kernel/configfs.rs
+++ b/rust/kernel/configfs.rs
@@ -157,7 +157,7 @@ impl<Data> Subsystem<Data> {
unsafe {
bindings::config_group_init_type_name(
&mut (*place.get()).su_group,
- name.as_ptr(),
+ name.as_char_ptr(),
item_type.as_ptr(),
)
};