]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rust: miscdevice: update ARef import to sync::aref
authorShankari Anand <shankari.ak0208@gmail.com>
Mon, 18 Aug 2025 13:28:06 +0000 (18:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Aug 2025 10:37:21 +0000 (12:37 +0200)
Update the import of `ARef` in misc_device sample to use
`sync::aref` instead of `types`.

This is part of the ongoing effort to move `ARef` and
`AlwaysRefCounted` to the `sync` module for better modularity
and type organization.

Suggested-by: Benno Lossin <lossin@kernel.org>
Link: https://github.com/Rust-for-Linux/linux/issues/1173
Signed-off-by: Shankari Anand <shankari.ak0208@gmail.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://lore.kernel.org/r/20250818132806.134248-1-shankari.ak0208@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
samples/rust/rust_misc_device.rs

index e7ab77448f754906615b6f89d72b51fa268f6c41..911b9320d3c02f7b74d9070109f72cf1fa1b7470 100644 (file)
@@ -105,8 +105,7 @@ use kernel::{
     miscdevice::{MiscDevice, MiscDeviceOptions, MiscDeviceRegistration},
     new_mutex,
     prelude::*,
-    sync::Mutex,
-    types::ARef,
+    sync::{aref::ARef, Mutex},
     uaccess::{UserSlice, UserSliceReader, UserSliceWriter},
 };