Skip to content

Commit 3b46f65

Browse files
tamirdojeda
authored andcommitted
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 <[email protected]> Acked-by: Andreas Hindborg <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 965a39a commit 3b46f65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/kernel/configfs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ impl<Data> Subsystem<Data> {
157157
unsafe {
158158
bindings::config_group_init_type_name(
159159
&mut (*place.get()).su_group,
160-
name.as_ptr(),
160+
name.as_char_ptr(),
161161
item_type.as_ptr(),
162162
)
163163
};

0 commit comments

Comments
 (0)